>>What can it do?
You can AUTO execute commands while entering standby/hibernation/sleep.
You can AUTO execute commands while resuming from standby/hibernation/sleep.
xxx
>>What does it need?
Autohotkey ( free @ AutoHotkey Download )
download and install.
xxx
>>What's next? (involves an example which needs to be editted)
Open Attachment (see below) in notepad (or something like it)
save as "whatever".ahk (make sure the .txt extension is gone!)
>>What does this file do when started?
It runs C:\suspend.bat when PC goes to sleep
It runs C:\resume.bat when PC wakes up
>>Example is for suspend only but what if you use hibernate or something else.
You'll need to edit "whatever".ahk and use one of the options I've pasted below. This requires some attention from the user but an idiot should be able to make it work
PBT_APMQUERYSUSPEND 0x0000
PBT_APMQUERYSTANDBY 0x0001
PBT_APMQUERYSUSPENDFAILED 0x0002
PBT_APMQUERYSTANDBYFAILED 0x0003
PBT_APMSUSPEND 0x0004
PBT_APMSTANDBY 0x0005
PBT_APMRESUMECRITICAL 0x0006
PBT_APMRESUMESUSPEND 0x0007
PBT_APMRESUMESTANDBY 0x0008
PBTF_APMRESUMEFROMFAILURE 0x00000001
PBT_APMBATTERYLOW 0x0009
PBT_APMPOWERSTATUSCHANGE 0x000A
PBT_APMOEMEVENT 0x000B
PBT_APMRESUMEAUTOMATIC 0x0012
>>What could I use this for?
MANY THINGS.
But I use it to change resolution after resume because windows/ati is lame sometimes and changes resolution for no reason after resume.
To fix this you need to download a program called Multires. ( EnTech Taiwan | Utilities | Multires )
copy paste this into the resume.bat
"C:\Program Files\Multires\multires.exe" /1920,1080,32,60
if it's your second monitor then use:
"C:\Program Files\Multires\multires.exe" /2:1920,1080,32,600
If needed you can slow this proces down a bit by using ( http://www.wcscnet.com/FTP/Freeware/Wait100.zip )
>> Compatibility
I assume it will work with most windows versions. I can report it works completely in Windows XP. A quick test on Vista revealed that autoexecute on suspend doesn't seem to work. But resume does work.
I assume that there is a simple explanation/solution for this. But I'll leave that to you for now. I have found what I needed
If needed I can explain further. I hope it helps!
You can AUTO execute commands while entering standby/hibernation/sleep.
You can AUTO execute commands while resuming from standby/hibernation/sleep.
xxx
>>What does it need?
Autohotkey ( free @ AutoHotkey Download )
download and install.
xxx
>>What's next? (involves an example which needs to be editted)
Open Attachment (see below) in notepad (or something like it)
save as "whatever".ahk (make sure the .txt extension is gone!)
>>What does this file do when started?
It runs C:\suspend.bat when PC goes to sleep
It runs C:\resume.bat when PC wakes up
>>Example is for suspend only but what if you use hibernate or something else.
You'll need to edit "whatever".ahk and use one of the options I've pasted below. This requires some attention from the user but an idiot should be able to make it work
PBT_APMQUERYSUSPEND 0x0000
PBT_APMQUERYSTANDBY 0x0001
PBT_APMQUERYSUSPENDFAILED 0x0002
PBT_APMQUERYSTANDBYFAILED 0x0003
PBT_APMSUSPEND 0x0004
PBT_APMSTANDBY 0x0005
PBT_APMRESUMECRITICAL 0x0006
PBT_APMRESUMESUSPEND 0x0007
PBT_APMRESUMESTANDBY 0x0008
PBTF_APMRESUMEFROMFAILURE 0x00000001
PBT_APMBATTERYLOW 0x0009
PBT_APMPOWERSTATUSCHANGE 0x000A
PBT_APMOEMEVENT 0x000B
PBT_APMRESUMEAUTOMATIC 0x0012
>>What could I use this for?
MANY THINGS.
But I use it to change resolution after resume because windows/ati is lame sometimes and changes resolution for no reason after resume.
To fix this you need to download a program called Multires. ( EnTech Taiwan | Utilities | Multires )
copy paste this into the resume.bat
"C:\Program Files\Multires\multires.exe" /1920,1080,32,60
if it's your second monitor then use:
"C:\Program Files\Multires\multires.exe" /2:1920,1080,32,600
If needed you can slow this proces down a bit by using ( http://www.wcscnet.com/FTP/Freeware/Wait100.zip )
>> Compatibility
I assume it will work with most windows versions. I can report it works completely in Windows XP. A quick test on Vista revealed that autoexecute on suspend doesn't seem to work. But resume does work.
I assume that there is a simple explanation/solution for this. But I'll leave that to you for now. I have found what I needed
If needed I can explain further. I hope it helps!