Double-click Caps Lock to execute PrntScrn Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
DavidPaul
Posts: 12
Joined: 04 Apr 2017, 18:28

Double-click Caps Lock to execute PrntScrn

18 Jun 2021, 22:50

I'm new at using AHK and am hoping for some pointers on implementing an idea.
I want to use a double-click of the Caps Lock to execute a PrntScrn command. Is that possible?
Thanks
Rohwedder
Posts: 7622
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Double-click Caps Lock to execute PrntScrn  Topic is solved

19 Jun 2021, 02:20

Hallo,
try:

Code: Select all

~*CapsLock Up::
IF (A_PriorHotkey = A_ThisHotkey And A_TimeSincePriorHotkey < 400)
    Send, {PrintScreen}
Return
or in one line:

Code: Select all

~*CapsLock Up::Send,% (A_PriorHotkey = A_ThisHotkey And A_TimeSincePriorHotkey < 400)?"{PrintScreen}":
DavidPaul
Posts: 12
Joined: 04 Apr 2017, 18:28

Re: Double-click Caps Lock to execute PrntScrn

19 Jun 2021, 05:31

Works exactly as I hoped. Thanks so much!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Rohwedder and 340 guests