Jump to content
Sign in to follow this  
singbass

Activate a PC

Recommended Posts

singbass

I have a PC that will eventually run a screen saver after x number of minutes of inactivity. I need to wake this PC up so I can run an app via an AutoIT script. I have experimented with WOL but the PC isn't really asleep, it's just in screensaver mode so sending the command doesn't do anything to stop the screensaver. I have tried mousemove but that doesn't work either.

The script needs to move the mouse and do some mouse clicks in certain spots. When the PC is active (ie the desktop is showing) the script will start the app and execute the necessary commands. In screensaver mode, it doesn't work. I assume it has to do with the WinWaitActive command never finding the window due to the screensaver. Is there any way to wake the PC up?

Share this post


Link to post
Share on other sites
PsaltyDS

MouseMove() in a loop should prevent the screen saver from activating in the first place.

You might also get your script to work if you don't ever expect the window to be active. I.E. WinWait() instead of WinWaitActive(). ControlSend() can work with the window without it being active. While the screen saver is active, windows can come and go, but no window will ever be ACTIVE.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
singbass

Thanks,

I don't think I have ever used ControlSend() before. I'll give it a try.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.