I need a script that, when holding down "x", presses the key combination with a delay of 2 ms "w wd d ds s sa a aw" and so on in a circle until the "x" button is released. Thank you
[Mod edit: Removed empty codebox.]
help with a script for moving in a circle when pressing "x" Topic is solved
Re: help with a script for moving in a circle when pressing "x"
Hallo,
try:
try:
Code: Select all
x::
N:=0, Keys:=["w Down","a Up","d Down"
,"w Up","s Down","d Up","a Down","s Up"]
While, GetKeyState("x","P")
SendInput,% "{" Keys[++N:=Mod(N, 8)] "}"
Send, {a Up}{w Up}{d Up}{s Up}
Return
Re: help with a script for moving in a circle when pressing "x"
Code: Select all
x::
sendmove("w,wd,d,ds,s,sa,a,aw")
return
sendmove(Var)
{
loop, Parse, Var, `,
{
send, % A_LoopField
Sleep, 50
if !GetKeyState("x", "P")
break
}
return
}
Re: help with a script for moving in a circle when pressing "x"
the first code doesn't work, I tried to change the value, I thought it would help, but it didn't work.
Re: help with a script for moving in a circle when pressing "x"
Perhaps the speed needs to be reduced? Try:
Code: Select all
x::
N:=0, Keys:=["w Down","a Up","d Down"
,"w Up","s Down","d Up","a Down","s Up"]
While, GetKeyState("x","P") {
SendEvent,% "{" Keys[++N:=Mod(N, 8)] "}"
Sleep, 50
}
SendEvent, {a Up}{w Up}{d Up}{s Up}
Return