The script works as is. But not when added to series of other scripts. For example, in the following example, it has been added at the end of other scripts. In this scenario, it does not work. TY.
Code: Select all
; Long press the escape key to reload and reset all scripts
~$*Esc::
KeyWait, Esc, T1
IF !ErrorLevel
Return ; if held for less than 1 second
SoundPlay, %A_WinDir%\Media\chord.wav, 1
For all, LF in [[0x1FF,"sc{:X}"],[0xFE,"vk{:X}"]]
Loop,% LF.1 ;release all pressed keys
IF (""<Key:=GetKeyName(Format(LF.2, A_Index)))
SendInput, {%Key% up}{Esc}
Reload
;toggle holding down the right and left mouse button for wheelless scrolling
f3::
alt := not alt
if (alt)
{
Click Down
Click, Down Right
}
else
{
Click Up
Click, Up Right
}
Return
; Define the commands for each tap
commands := ["{numpad0}", "{numpad1}", "{numpad2}", "{numpad3}", "{numpad8}"]
; Initialize the counter
counter := 1
; Hotkey for the "\" key
f4::
; Execute the corresponding command
Send, % commands[counter]
; Increment the counter
counter := (counter = 5) ? 1 : counter + 1
return