home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
General Support
TIP: Running commands on standby, hibernation and resume events (draft)
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="infy" data-source="post: 397637" data-attributes="member: 18159"><p>>>What can it do?</p><p>You can AUTO execute commands while entering standby/hibernation/sleep. </p><p>You can AUTO execute commands while resuming from standby/hibernation/sleep.</p><p></p><p>xxx</p><p></p><p>>>What does it need?</p><p>Autohotkey ( free @ <a href="http://www.autohotkey.com/download/" target="_blank">AutoHotkey Download</a> )</p><p>download and install.</p><p></p><p>xxx</p><p></p><p>>>What's next? (involves an example which needs to be editted)</p><p>Open Attachment (see below) in notepad (or something like it)</p><p>save as "whatever".ahk (make sure the .txt extension is gone!)</p><p></p><p>>>What does this file do when started?</p><p>It runs C:\suspend.bat when PC goes to sleep</p><p>It runs C:\resume.bat when PC wakes up</p><p></p><p>>>Example is for suspend only but what if you use hibernate or something else.</p><p>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 <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /></p><p>PBT_APMQUERYSUSPEND 0x0000</p><p>PBT_APMQUERYSTANDBY 0x0001</p><p> </p><p>PBT_APMQUERYSUSPENDFAILED 0x0002</p><p>PBT_APMQUERYSTANDBYFAILED 0x0003</p><p> </p><p>PBT_APMSUSPEND 0x0004</p><p>PBT_APMSTANDBY 0x0005</p><p> </p><p>PBT_APMRESUMECRITICAL 0x0006</p><p>PBT_APMRESUMESUSPEND 0x0007</p><p>PBT_APMRESUMESTANDBY 0x0008</p><p> </p><p>PBTF_APMRESUMEFROMFAILURE 0x00000001</p><p> </p><p>PBT_APMBATTERYLOW 0x0009</p><p>PBT_APMPOWERSTATUSCHANGE 0x000A</p><p> </p><p>PBT_APMOEMEVENT 0x000B</p><p>PBT_APMRESUMEAUTOMATIC 0x0012</p><p></p><p>>>What could I use this for?</p><p>MANY THINGS.</p><p>But I use it to change resolution after resume because windows/ati is lame sometimes and changes resolution for no reason after resume.</p><p>To fix this you need to download a program called Multires. ( <a href="http://www.entechtaiwan.com/util/multires.shtm" target="_blank">EnTech Taiwan | Utilities | Multires</a> )</p><p>copy paste this into the resume.bat</p><p>"C:\Program Files\Multires\multires.exe" /1920,1080,32,60</p><p>if it's your second monitor then use:</p><p>"C:\Program Files\Multires\multires.exe" /2:1920,1080,32,600</p><p></p><p>If needed you can slow this proces down a bit by using ( <a href="http://www.wcscnet.com/FTP/Freeware/Wait100.zip" target="_blank">http://www.wcscnet.com/FTP/Freeware/Wait100.zip</a> )</p><p></p><p>>> Compatibility</p><p>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.</p><p>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 <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p></p><p></p><p>If needed I can explain further. I hope it helps!</p></blockquote><p></p>
[QUOTE="infy, post: 397637, member: 18159"] >>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 @ [url=http://www.autohotkey.com/download/]AutoHotkey Download[/url] ) 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. ( [url=http://www.entechtaiwan.com/util/multires.shtm]EnTech Taiwan | Utilities | Multires[/url] ) 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 ( [url]http://www.wcscnet.com/FTP/Freeware/Wait100.zip[/url] ) >> 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! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
General Support
TIP: Running commands on standby, hibernation and resume events (draft)
Contact us
RSS
Top
Bottom