Note 1: I generally hold autofire keys (at most 2) and tap other 2 macros once (maybe while holding 2 autofire macros)
Note 2: I am using Windows 10.
Note 3: Although there are better ways to write these codes, I tried a few and all of them got stuck (continued autofiring after I release the key) and did not work simultaneously (I generally press J&L or K&L together continuously, so if one does not work when I try to press while pressing the other, it is a big problem for me).
Autofire script (same for K and L):
Code: Select all
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#Persistent
#IfWinActive, ahk_exe HD-Player.exe
$j::
GoSub, AutoFireJ
return
AutoFireJ:
Send, j
if GetKeyState("j", "P")
SetTimer, AutoFireJ, -16
return
1 - Send A and T after LShift is tapped
Code: Select all
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#Persistent
#IfWinActive, ahk_exe HD-Player.exe
$SC02A::-
While GetKeyState("SC02A", "P") {-
SendInput, a
Sleep, 20
SendInput, t
Sleep, 20
}
Return
Code: Select all
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#Persistent
#IfWinActive, ahk_exe HD-Player.exe
$SC027::
While GetKeyState("SC027", "P") {
SendInput, {Space}
Sleep, 20
SendInput, t
Sleep, 20
}
Return