Move the mouse without activating dormant

Get help with using AutoHotkey and its commands and hotkeys
Posts: 647
Joined: 17 Nov 2013, 11:32

Move the mouse without activating dormant

02 Feb 2014, 05:29

Computer in sleep, move the mouse the computer will wake up. Now, how to use AHK to achieve, move the mouse without letting the computer awake?

I want to activation of dormant mouse and keyboard are masked, save only "RButton". Only "RButton", in order to activate the system.
Posts: 278
Joined: 30 Sep 2013, 00:45
Location: France

Re: Move the mouse without activating dormant

04 Feb 2014, 07:04

It will be hard... no reply

About a quick solve, go to your device manager or run "mmc devmgmt.msc"
( ... =windows-7 ... 54081.aspx )
...after that, go to proprieties of your mouse and uncheck the wake up box in the power managment tab...
( ... -computer/ )
Maybe there is a one line command for do this or a regwrite to do, out of my knowledge so say it if you know.

But there is a high chance that you will never go to a sleep mode because your ahk script (process and thread) will trigger the state of an user activy (without the mouse problem, just about a system using), then maybe you have to write Process, priority, , idle and use some msdn function to disable some warning...

Else, perhaps investigate if you can intercept WM_POWERBROADCAST message or other and don't translate them ( ... 73247.aspx), RegisterSuspendResumeNotification function is enough ? do some search on ahk forum ( example about power notification: ... fications/ )
If you can't fully intercept then for example you can force to sleep, each time that you have a left click and a wake up message, with SetSystemPowerState function ( ... 73206.aspx ) or a "rundll32 powrprof.dll,SetSuspendState" for example, but I doubt that it is safe for your hardware and possible flickering...

In other word, there are ton of things to search and test, a lot of idea can start from each function of there at ... 73163.aspx

Be carefull, if you disable your keyboard and mouse, your computer will sleep forever or you have to wake it with a strong timer or an other device (or an hotkey with a wakep up command if the hook is still watched or keyboard not powered cut off by system power management)...
Also an expert (if he come) can say if there is a difference between simulate mouse mouvement (check send method, injected message, sendmessage trick...) and real hardware signal for the powermanagement ( again out of my knowledge and haven't time to test )
It was just some noob thoughts, and don't forget that there are not only one sleep state, you can be confused with hibernate, idle, power off, wakeup on lan, harddrive sleep,... , good luck !
Posts: 647
Joined: 17 Nov 2013, 11:32

Re: Move the mouse without activating dormant

04 Feb 2014, 08:48

Thank for your help.
You provide very useful information and suggestions, I now begin to try.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], RubbeH, TAC109, tt_1111 and 40 guests