Hello dear AHK community,
what I am trying to do for hours is, when I press down A+W and C together,
I want AHK to 'counter strafe' meaning hold S + D keys down.
simplified, when pressing A, W and C, hold down S, D till one key is released.
I don't want to share my code since its a complete chaos and hope that someone might be
able to help.
kind regards,
zhau xu
I don't have the knowledge to do this Topic is solved
Re: I don't have the knowledge to do this
Code: Select all
a::
send {a down}
return
a up::
send {a up}
if (!getkeystate("s","P")) and (!getkeystate("d","P"))
send {s up}{d up}
return
w::
send {w down}
return
w up::
send {w up}
if (!getkeystate("s","P")) and (!getkeystate("d","P"))
send {s up}{d up}
return
c::
send {c down}
return
c up::
send {c up}
if (!getkeystate("s","P")) and (!getkeystate("d","P"))
send {s up}{d up}
return
#if (getkeystate("a","P")) and (getkeystate("w","P")) and (getkeystate("c","P"))
a::
w::
c::
send {s down}{d down}{c up}{w up}{a up}
return
#if
Re: I don't have the knowledge to do this Topic is solved
Hallo,
try:
try:
Code: Select all
#InstallKeybdHook
SetTimer, CounterStrafe, 50
CounterStrafe := False
Return
CounterStrafe:
IF !CounterStrafe And GetKeyState("a","P") And GetKeyState("w","P") And GetKeyState("c","P")
{
CounterStrafe := True
SendInput, {Blind}{a Up}{w Up}{c Up}{s Down}{d Down}
}
Else IF CounterStrafe And (!GetKeyState("a","P") Or !GetKeyState("w","P") Or !GetKeyState("c","P"))
{
CounterStrafe := False
SendInput, {s Up}{d Up}
}
Return
#IF CounterStrafe
a::s
w::d
c::Return
#IF