Hello! I want to make a script so while I hold down Space key: Hold down Space key and Press Left key at the start and every 800 milliseconds. This 2 actions until I release the Space Key.
I tried to do this scrip but I failed at making the Space key hold as long as I hold my space key and to spam the Left key every 800 milliseconds. I did a While-Loop with sleep time but I don't want my space key to be hold up and down again after the sleep time, just the Left key. For making the loop to break after I release my Space key I did a simple 'if not GetKeyState("Space", "P") break' but the sleep time prevented me from casting the loop again instantly if I release it too soon. I don't think it's to complicated so if anyone manage to do it it would be appreciated, thanks!
I'm quite new to this so sorry if it sound too simple.
Help with a script Topic is solved
Re: Help with a script
$Space::
SendInput, {Space Down}
While GetKeyState("Space","P")
{
SendInput, {Left}
Sleep 800
}
Return
$Space Up::
SendInput, {Space Up}
Return
This is what I got so far. I'm just missing a way to cancel the Sleep when I release the Space Key since it prevents me from doing the script again.
SendInput, {Space Down}
While GetKeyState("Space","P")
{
SendInput, {Left}
Sleep 800
}
Return
$Space Up::
SendInput, {Space Up}
Return
This is what I got so far. I'm just missing a way to cancel the Sleep when I release the Space Key since it prevents me from doing the script again.
Who is online
Users browsing this forum: mikeyww, Oblomov228, PsysimSV, uchihito and 166 guests