Lock Workstation

Get help with using AutoHotkey and its commands and hotkeys
09KR0058
Posts: 25
Joined: 11 Apr 2016, 18:08

Lock Workstation

18 Aug 2016, 17:42

Trying to lock a Windows 7 machine via AHK. Normally, to do this you just hold down the Windows key and hit the letter l (lowercase L). I have tried it the following 3 ways, but none of them work:

Send #l

Send, {LWin Down}l{LWin Up}

Send, {LWin down}
Send l
Send, {LWin up}

Am I missing something obvious?
punchin
Posts: 434
Joined: 17 Jan 2014, 17:54

Re: Lock Workstation

18 Aug 2016, 17:53

Look at the remarks on the # modifier for hotkeys
Win (Windows logo key). In v1.0.48.01+, for Windows Vista and later, hotkeys that include the Windows key (e.g. #a) will wait for the Windows key to be released before sending any text containing an "L" keystroke.
You might want to explore the Run command with information from here.
lexikos
Posts: 7088
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Lock Workstation

18 Aug 2016, 18:14

Code: Select all

DllCall("LockWorkStation")
09KR0058
Posts: 25
Joined: 11 Apr 2016, 18:08

Re: Lock Workstation

23 Aug 2016, 18:31

Thanks guys

Return to “Ask For Help”

Who is online

Users browsing this forum: autohotkeycool, coccosoids, grossermanitu, Ram, songdg, unleashed7, watagan and 54 guests