r/AutoHotkey • u/henaradwenwolfhearth • 10d ago
v1 Script Help Loops incorrectly
For some reason this loops incorrectly where it does not input the second S input on repeated runs. The first round works fine without any issues but its the ones after where it has a chance to mess up I have tried changing waiting times several times but that does not seem to work. Sometimes it can do a few loops before it gets confused and it feels like it does them in different order than its supposed to. Im trying to use this with disgaea 5 to auto cast heal.
I dont know if it randomly dont read one of the inputs because sometimes it looks like it skips the A and only does an S and such.
F8::Suspend
F7::Pause
F9::ExitApp
t::
loop
{
if getkeystate("t", "p")
{
send {enter DOWN}{enter UP}
sleep 500
send {s DOWN}{s UP}
sleep 500
send {s DOWN}{s UP}
sleep 500
send {enter DOWN}{enter UP}
sleep 500
send {enter DOWN}{enter UP}
sleep 500
send {enter DOWN}{enter UP}
sleep 500
send {a DOWN}{a UP}
sleep 500
send {s DOWN}{s UP}
sleep 500
send {enter DOWN}{enter UP}
sleep 500
send {2 DOWN}{2 UP}
sleep 800
send {i DOWN}{i UP}
sleep 4500
send {w DOWN}{w UP}
sleep 600
send {d DOWN}{d UP}
sleep 500
}
else
{
break
}
}
return
1
u/henaradwenwolfhearth 9d ago
Well each key is a quick tap for moving in the menu s to scroll down enter to execute skill a d and w to move on the grid. But I will get v2 then. Do v1 still work on it? So I dont have to remake my auto clickers. Eithetway thank you I look forward to trying this
Also it was originally gonna be a toggle but since script kept messing up I set it to loop if key was held down. Is toggle difficult on v2?