TerryHuangqiuguang Posted December 22, 2008 Share Posted December 22, 2008 Hi, Guys, Can I develop a script let PC resume from standby or hibernation with AutoIT? Thanks Link to comment Share on other sites More sharing options...
komalo Posted December 22, 2008 Share Posted December 22, 2008 you can try this : http://msdn.microsoft.com/en-us/library/ms686289(VS.85).aspx fResume [in] If this parameter is TRUE, restores a system in suspended power conservation mode when the timer state is set to signaled. Otherwise, the system is not restored. If the system does not support a restore, the call succeeds, but GetLastError returns ERROR_NOT_SUPPORTED. [font="Palatino Linotype"][size="3"]AutoIt Script Examples :[/size][/font][font="Palatino Linotype"][size="3"]_CaptureBehindWindowGlass CMD for Windows Vista/Seven[/size][/font][left][/left][font="Palatino Linotype"][size="3"]Non AutoIt Script programs : Border Skin - Aero Glass On XP[/size][/font] Link to comment Share on other sites More sharing options...
TurionAltec Posted December 22, 2008 Share Posted December 22, 2008 (edited) For implementation of CreateWaitableTimer, SetWaitableTimerCheck the code is this thread:http://www.autoitscript.com/forum/index.php?showtopic=21575How you enter Standby or Hibernation is important. From MSDN:http://msdn.microsoft.com/en-us/library/aa373201.aspxBOOLEAN WINAPI SetSuspendState( __in BOOLEAN Hibernate, __in BOOLEAN ForceCritical, __in BOOLEAN DisableWakeEvent );If DisableWakeEvent is set as true, it won't wake up when your timer expires. I believe Autoit's shutdown(32) & shutdown(64) (standby/hibernate) command will allow wake events, but for example, the improperly called, but often citedrundll32.exe powrprof.dll,SetSuspendStateWill both try to call a hibernate, and disablewake events.I also believe pressing the "sleep" button on a computer will allow wake events. Edited December 22, 2008 by TurionAltec Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now