Need help with Autohotkey-Script: Should a button be pressed at the push of a button and should it be as long as the first one?

Gu
4

I'm currently playing Minecraft and for that I want to put together some cool scripts. One is supposed to be that when I run forward, I jump automatically. Do he sees so far

W::
GetKeyState, state, w
if state = D
{
Send {w down}
Send, space
GetKeyState, state, w
sleep 50
}
return

The script just doesn't work, because then I also have to put the w in for running forward, which then messes up the keystate. How can I fix that?

Je

Is Send {w down} necessary at all? And why don't you just activate auto jump?

Gu

It should jump automatically even on flat surfaces. I also want a script that if I hit it will jump automatically

Je

Send {w down} should still be unnecessary. You're sending that anyway, right?

Gu

This is prevented by the hotkey. At least it didn't work when I tried it without it