Jump to content
Sign in to follow this  
gomi

Help W/ Waking System From Standby/hibernate

Recommended Posts

gomi

Hi all,

I'm new to using AutoIt. I'm trying to use AutoIt for work purposes where I'm looking to write a script that will make my system go into and out of stand by every couple minutes or so.

I've used the following command to place my system into stand by:

Shutdown(32)

But I'm still trying to find a way to wake my system up.

I started looking into using the CreateWaitableTImer and SetWaitableTimer but kind of got stuck on how to set it up the parameters properly for it to all work.

Is there a quicker or better way to do this? I'm so stuck.

If everyone has some insights or info. on this please do help~!

Thanks lots!

Gomi~

Share this post


Link to post
Share on other sites
gomi

Question:

Say for example if this is my code>>

Shutdown(32) ; system is in stand by mode now

Sleep(10000) ; i want it to wait for 10 seconds before waking

[code for mouse move that should wake up the system]

After the system is placed into stand by will the script still continue to run? Does the execution of the script stops right after Shutdown(32) ?

If thats the case then it would mean that if i had code for mousemove it would never get executed until the system does come out of stand by?

Share this post


Link to post
Share on other sites
Bert

I found this:http://www.kellys-korner-xp.com/xp_standby.htm#xp_wake

If you have the mouse set so if you moved it, the system will come out of standby.

try to see if the mousemove with the sleep function will work. If it doesn't, we can try something else.

Share this post


Link to post
Share on other sites
gomi

not working ;)

here's the code that I have in my script:

Shutdown(32)

Sleep(10000) ; wake up system after 10 seconds

MouseMove(900,600)

MsgBox(0, "testing", "testing testing")

After going to stand by, the system did not wake up after a minute plus.

In the end I had to manually moved the mouse to wake the system. Once my Windows started, I saw the second part of my code execution. Pretty much after 10 seconds, I saw my MouseMove to the middle of the screen and then the pop up of a message box.

Looks like the script stopped executing after the system goes into stand by and does not continue until it is awaken. :think:

any suggestions? has anyone used waitable timer objects before? this is the only way that i'm seeing so far that can wake the system from a suspend mode. but im having trouble putting in the correct parameters. argh! :)

http://msdn.microsoft.com/library/default....mer_objects.asp

help help help~~~ :(

Share this post


Link to post
Share on other sites
forger

well I haven't found any command to help you, but I found this program: http://noeld.com/programs.asp?cat=dstools#wakeup

(yes, it's freeware :think:)

Among other things, you can:

- have your system to resume after a specified amount of time or at a specific time

- configure WakeUp to launch an application or an URL on resume

Share this post


Link to post
Share on other sites
SmOke_N

I think this question was just answered in SNS: http://www.autoitscript.com/forum/index.php?showtopic=21575


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
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
Sign in to follow this  

×