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 

Lock Computer and Turn off Monitor...

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Wawa
Guest





PostPosted: Thu Jul 09, 2009 6:10 pm    Post subject: Lock Computer and Turn off Monitor... Reply with quote

Why does this code not lock my computer as well as turn off the monitors?

The monitors shut off fine, but my computer does not lock -- any ideas?

Code:
^F10::
Sleep, 200
Send, #L
Sleep, 200
SendMessage,0x112,0xF170,2,,Program Manager
return
Back to top
BigVent



Joined: 29 May 2008
Posts: 180

PostPosted: Thu Jul 09, 2009 7:06 pm    Post subject: Reply with quote

Code:
^F10::
{
Sleep, 200
DllCall("LockWorkStation")
Sleep, 200
SendMessage,0x112,0xF170,2,,Program Manager
}
return

_________________
~BigVent
Back to top
View user's profile Send private message
Wawa
Guest





PostPosted: Fri Jul 10, 2009 1:29 pm    Post subject: Reply with quote

Perfect, thanks!!
Back to top
BigVent



Joined: 29 May 2008
Posts: 180

PostPosted: Fri Jul 10, 2009 2:20 pm    Post subject: Reply with quote

Glad to help! Very Happy
_________________
~BigVent
Back to top
View user's profile Send private message
jasa56



Joined: 27 Oct 2008
Posts: 12

PostPosted: Fri Jul 17, 2009 2:19 pm    Post subject: Reply with quote

nice !
Back to top
View user's profile Send private message
badmojo



Joined: 11 Nov 2005
Posts: 202

PostPosted: Sat Jul 18, 2009 2:05 am    Post subject: Reply with quote

just curious, why the parentheses made the difference?
Back to top
View user's profile Send private message
jasonbason
Guest





PostPosted: Fri Sep 16, 2011 9:34 pm    Post subject: Cool Reply with quote

This works great! Funny, two years later and it's still helpful. Love the interwebs Razz
Back to top
Display posts from previous:   
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