mhf
Joined: 18 Nov 2009 Posts: 1
|
Posted: Sun Nov 22, 2009 6:43 pm Post subject: simple sleep script with no mouse waker-upper |
|
|
Hi, I'm writing a simple routine to sleep my PC but want to add the blockinput command to prevent waking up when moving the mouse - I'd like to wake up the PC with just the Esc key - but I can't get it to work, any ideas please ?
Thanks. |
|
txquestor
Joined: 22 Aug 2009 Posts: 294
|
Posted: Sun Nov 22, 2009 8:08 pm Post subject: |
|
|
Can't do anything while asleep,
but if awake you can do this.
If blocks any input and puts the mouse in the upper right corner
when the PC is awake. Press ESC to allow normal input
| Code: |
#Persistent
SetTimer, WatchCursor, 10
return
WatchCursor:
MouseGetPos,x,y
BlockInput, ON
If (x<x)
MouseMove,0,0,0
If (x>x)
MouseMove,0,0,0
If (y<x)
MouseMove,0,0,0
If (y>y)
MouseMove,0,0,0
return
ESC::
BlockInput, OFF
ExitApp
|
_________________
"Man's quest for knowledge is an expanding series whose limit is infinity" |
|