AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

simple sleep script with no mouse waker-upper

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
mhf



Joined: 18 Nov 2009
Posts: 1

PostPosted: Sun Nov 22, 2009 6:43 pm    Post subject: simple sleep script with no mouse waker-upper Reply with quote

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.
Back to top
View user's profile Send private message
tank



Joined: 21 Dec 2007
Posts: 2294
Location: Louisville KY USA

PostPosted: Sun Nov 22, 2009 7:46 pm    Post subject: Reply with quote

no Confused
you see the PC cant do anything while its asleep
You apparently dont understand standby mode

If you intent is block user interaction with the machine during the job unplug the keyboard and mouse

blockinput is always going to be disabled by ctrl alt del

baring that tho you could erect and always on top gui to cover the screen as well if privacy is important while you crack the email password for your bosses email
_________________
Basic Webpage Controls with JavaScript / COM - Tutorial by Jethrow
Back to top
View user's profile Send private message
txquestor



Joined: 22 Aug 2009
Posts: 294

PostPosted: Sun Nov 22, 2009 8:08 pm    Post subject: Reply with quote

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"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group