Um, unless you already had it in the source code for "skinbedder4", your gonna have to teach me how to detect a resume . I have no clue. Also, I previously added a shutdown script but it never worked. I put it in the OnFormClose handler but I guess it won't let me ShellEx while I am already shutting down. Do you know how to fix that? Also, is it possible to run a script just before entering hibernate (might be usful someday)?
Um, unless you already had it in the source code for "skinbedder4", your gonna have to teach me how to detect a resume . I have no clue. Also, I previously added a shutdown script but it never worked. I put it in the OnFormClose handler but I guess it won't let me ShellEx while I am already shutting down. Do you know how to fix that? Also, is it possible to run a script just before entering hibernate (might be usful someday)?
Well, I was able to pause recognition before hibernation in NaviVoice, so MAYBE we'll be able to run a script on coming into hibernation. But we should be able to run it when coming out for sure.
Code:
//--- WMPowerBroadcast -------------------------------------------------------\\
procedure TfrmCommandAndControl.WMPowerBroadcast(var message: TMessage);
var
I : Integer;
begin
case message.WParam of
$0004 : begin
log('PBT_APMSUSPEND'); //PBT_APMSUSPEND
spsharedrecocontext.State := SRSInactive;
end;
$0005 : log('PBT_APMSTANDBY'); //PBT_APMSTANDBY
$0006 : log('PBT_APMRESUMECRITICAL'); //PBT_APMRESUMECRITICAL
$0007 : begin
log('PBT_APMRESUMESUSPEND'); //PBT_APMRESUMESUSPEND
spsharedrecocontext.State := SRSActive;
if Title <> 'MapMonkey' then
if EXE_Running(
LoadString('programs', 'program_name400', 'NaviVoice.ini'),
True) then begin
log('navigation was running');
bringformtofront(FindWindow(PChar('#32770'), nil));
SendKeysToTitle(Title,SK_ENTER);
BringFormToFront(GetHandleFromWindowTitle(Title));
SendKeysToTitle(Title,SK_Alt_DN + 'T' + SK_ALT_UP);
SendKeysToTitle(Title,'G');
SendKeysToTitle(Title,SK_RIGHT);
SendKeysToTitle(Title,SK_DOWN);
SendKeysToTitle(Title,SK_RIGHT);
for i := 1 to (LoadInteger('settings','commport',
'NaviVoice.ini') - 1) do
SendKeysToTitle(Title,SK_DOWN);
SendKeysToTitle(Title,SK_ENTER);
end
end;
$0008 : log('PBT_APMRESUMESTANDBY'); //PBT_APMRESUMESTANDBY
end;
end;
//--- WMPowerBroadcast -------------------------------------------------------//
Add procedure WMPowerBroadcast(var message: TMessage); to private.
Ok... so WMPowerBroadcast is automatically triggered when the OS sends a broadcast message? How do it know?
(I tink du most impotant invention of the 21st century is d turmus, cause it keep hot stuff hot, and cold stuff cold... only question I got is: How do it know?)
Ok... so WMPowerBroadcast is automatically triggered when the OS sends a broadcast message? How do it know?
(I tink du most impotant invention of the 21st century is d turmus, cause it keep hot stuff hot, and cold stuff cold... only question I got is: How do it know?)
Its windows API
Windows will broadcast the message that it is doing something with power, and this will pick it up and execute some instructions. It worked in NaviVoice quite well. I was able to get around the no SAPI on resume by pausing recognition before hibernation and resuming it after. Worked real well
So I take it the procedure has to be named exactly that for the API to auto-run it right? Do you know anymore of these specially named functions that the Windows API auto-runs on certain events (sounds useful )?
I've tried to use this to make a ts friendly nes emulator, but it simply doesn't embedd properly, look at the attatched screenshot and SKINbedder.ini file.
I'm no programmer so mybe its just some easy thing I've missed , but I've tested all i could come up with, and none of it works
it seams like you got rid of the winclass stuff in some of the lines...don't know if it makes that much diff...but someone will post a sol(0l33l) I'm sure....sorry
Is v 2.5 considered too 'crude' for general use? I gave it a try, and found that it is lacking in many areas. Simply not reliable or polished enough. This looks like a VERY promising piece of software!
this IS only the second ver...but the first app that it was based on was GPS and aside from a reconnect on resume it work fine for these apps...but they are working on making it more useable for almost any app...right??? Ol33l
So I take it the procedure has to be named exactly that for the API to auto-run it right? Do you know anymore of these specially named functions that the Windows API auto-runs on certain events (sounds useful )?
Well, I do have some code that detects if you open or close your CD rom, but I doubt that we'll need to use it