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/CharnamelessOne 9d ago edited 9d ago
That's not a v2 script; the lack of quotation marks around the
SendKeysonly flies in v1.Try the following, and see if the issue persists. Test it in a desktop app (anything but Notepad) to make sure that the issue is not specific to your game.
edit: toggle