How to send Win+L

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
prism17
Posts: 2
Joined: 06 Jan 2020, 02:07

How to send Win+L

Post by prism17 » 26 May 2022, 01:28

I want to remap my ScrLk key to lock my laptop and turn off the monitor, for now I just can't send win + L. does anybody know why it isn't works, thanks in advance!

Code: Select all

ScrollLock::
Send, #l
Run nircmd monitor off

Rohwedder
Posts: 7623
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: How to send Win+L

Post by Rohwedder » 26 May 2022, 03:17

Hallo,
try:

Code: Select all

ScrollLock::
SendMessage, 0x112, 0xF170, 2,, Program Manager ; Turn off the monitor(s)
DllCall("LockWorkStation")
Return

Post Reply

Return to “Ask for Help (v1)”