Please help me improve the script

Ask gaming related questions (AHK v1.1 and older)
Gussioriginal
Posts: 2
Joined: 21 Jan 2022, 09:31

Please help me improve the script

Post by Gussioriginal » 21 Jan 2022, 09:48

I would like that when the Alt button is pressed, it spams the spacebar until the key is released, now it turns out that it is activated with one press, and stops with the second, but it is necessary that it does not stop working until it is pressed. Thanks in advance!

Code: Select all

$Alt::
	toggle:=!toggle
	While toggle {
		Send {Space}
		}           
	toggle:=0
Return
Last edited by BoBo on 21 Jan 2022, 11:32, edited 1 time in total.
Reason: Moved to Gaming section.

User avatar
mikeyww
Posts: 27096
Joined: 09 Sep 2014, 18:38

Re: Please help me improve the script

Post by mikeyww » 21 Jan 2022, 10:31

Code: Select all

LAlt::
RAlt::
While GetKeyState("Alt", "P")
 Send {Space}
Return

Post Reply

Return to “Gaming Help (v1)”