How to have AHK check if an action has been performed within the last 15 seconds - Ask for Help - AutoHotkey Community

PHOTO EMBED

Thu Dec 15 2022 15:53:48 GMT+0000 (Coordinated Universal Time)

Saved by @Failed84 #auto

cooldown :=
return
 
cooldowntimer:
cooldown := !cooldown
soundplay somefile.wav
return
 
$z::
if !cooldown {
    send {z}
    cooldown := !cooldown
    settimer cooldowntimer,-15000
}
return
content_copyCOPY

https://www.autohotkey.com/board/topic/100969-how-to-have-ahk-check-if-an-action-has-been-performed-within-the-last-15-seconds/