Move the mouse without activating dormant

Get help with using AutoHotkey and its commands and hotkeys
arcticir
Posts: 578
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.
Zelio
Posts: 275
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"
( http://windows.microsoft.com/en-us/wind ... =windows-7 http://technet.microsoft.com/en-us/libr ... 54081.aspx )
...after that, go to proprieties of your mouse and uncheck the wake up box in the power managment tab...
( http://www.howtogeek.com/howto/15132/st ... -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 ( http://msdn.microsoft.com/en-us/library ... 73247.aspx), RegisterSuspendResumeNotification function is enough ? do some search on ahk forum ( example about power notification: http://www.autohotkey.com/board/topic/9 ... 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 ( http://msdn.microsoft.com/en-us/library ... 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 http://msdn.microsoft.com/en-us/library ... 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 !
arcticir
Posts: 578
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], Gully, Odlanir, SuperFoobar and 189 guests