Spam 'f' key for a specific window
Spam 'f' key for a specific window
Hello! I'm new to AHK and I was hoping to ask for help on how to spam 'f' key every three seconds for a specific window/application. I'd like to start and end the script with f1. Thank you!
Re: Spam 'f' key for a specific window
Welcome to this AutoHotkey forum!
If you are new to AHK, I recommend using its current version, which is v2, instead of this older deprecated version that is no longer developed.
Code: Select all
#Requires AutoHotkey v1.1.33.11
winTitle := "ahk_exe Notepad.exe"
ctl := "RichEditD2DPT1" ; Win 11
#If WinExist(winTitle)
F1::
If !on := !on {
SetTimer Spam, Off
SoundBeep 1000
Return
}
SetTimer Spam, 3000
Spam:
If on
ControlSend % ctl, f, % winTitle
Return
#If
Who is online
Users browsing this forum: doanmvu and 73 guests