I want to write an AutoHotkey script which loop a key X number of times.
For example, here's is a script which overwrites the function of ENTER
key with function of F2
key in File Explorer.
#IfWinActive ahk_class CabinetWClass
Enter::
Send, {F2}
#IfWinActive ahk_class CabinetWClass
Enter::
Send, {ENTER}
#IfWinActive
The goal is to press ENTER
to rename a select file, and then press ENTER
to confirm the rename. Pressing ENTER
on the same file that have just been renamed should send F2
key again (In case there is typo error).
Currently the second block doesn't work as I'm sending the same key, how to fix this?