What it should do
z -> SetTimer, loop, -1
loop -> IfWinActive
-> press key !IfWinActive
-> release key
My Code:
#SingleInstance Force
z::
SetTimer, loop, -1
return
loop:
IfWinActive, Minecraft 1.8.9 | LabyMod 3.6.13
{
; Press key aslong true
}
return
But I simply not know how to simulate a key press aslong something is true
Edit:
Now I have this
It loops loop
until i press z again
loop :=0
z::
if (GetKeyState("w"))
{ ; turns the loop off if w is already pressed
loop :=0
SetTimer, loop, Off
Send {w} ; send w again so you stop running why ever minecraft is like that
}
else
{
loop :=1
SetTimer, loop, 1
}
return
loop:
while (loop)
{
IfWinActive, Minecraft 1.8.9 | LabyMod 3.6.13
{
Send % "{w Down}"
}
IfWinNotActive, Minecraft 1.8.9 | LabyMod 3.6.13
{
Send % "{w Up}"
}
}
return
But the problem is it constantly presses w up
or w down
if i wanny tab out the game it becomes buggy because i cant do a shortcut because it keeps interrupted by w down
. it should only press w down
until i tab out then it should press w up
until i go in minecraft again
;Press key aslong true
, do you mean hold down that key, or repeatedly press and release the key? – Spyre