Hotkey for script?

Ask gaming related questions (AHK v1.1 and older)
withoutadoubt
Posts: 1
Joined: 15 Jan 2018, 19:26

Hotkey for script?

15 Jan 2018, 19:32

Hello,

I''m trying to run this script.

Lbutton::
Loop
{
SetMouseDelay 30
Click
If (GetKeyState("LButton","P")=0)
Break
}


It rapidly clicks my left mouse button, that's what I want, it works. However, I don't want it to be activated by actually clicking my left mouse button, I want it to send the rapid left click commands when I press and hold control+A for example.
How do I accomplish this?

I tried this and it would only send one click.

^a::
send Lbutton::
Loop
{
SetMouseDelay 30
Click
If (GetKeyState("LButton","P")=0)
Break
}


Thanks for any help.
Rohwedder
Posts: 7626
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Hotkey for script?

17 Jan 2018, 13:35

Hallo,
try with Hotkey Control+Lbutton:

Code: Select all

#InstallKeybdHook
^Lbutton:: ;Control+Lbutton
	SetMouseDelay 30
	While, GetKeyState("Lbutton","P")
	And GetKeyState("Ctrl","P")
		Send {Click}
Return

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Rohwedder and 79 guests