Jump to content

Can I resume PC from standby by AutoIT script


Recommended Posts

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

For implementation of CreateWaitableTimer, SetWaitableTimer

Check the code is this thread:

http://www.autoitscript.com/forum/index.php?showtopic=21575

How you enter Standby or Hibernation is important. From MSDN:

http://msdn.microsoft.com/en-us/library/aa373201.aspx

BOOLEAN 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 cited

rundll32.exe powrprof.dll,SetSuspendState

Will both try to call a hibernate, and disablewake events.

I also believe pressing the "sleep" button on a computer will allow wake events.

Edited by TurionAltec
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...