If toggle active and left click pressed Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
TogglesAndLoops

If toggle active and left click pressed  Topic is solved

17 Jun 2018, 12:58

I'm trying to create a toggle. If that toggle is active and left click is pressed it will spam left click. This is what I have so far:

Code: Select all

r::
    Toggle := !Toggle
     While Toggle {
		lbutton::
		 {
		  while, GetKeyState("lbutton","P")
		   {
			 click
			 sleep, 500
		   }
		}
	return
    }
return
Rohwedder
Posts: 7679
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: If toggle active and left click pressed

18 Jun 2018, 01:43

Hallo,
try:

Code: Select all

r::
	Toggle := !Toggle
Return
#If Toggle
	lbutton::
	{
		while, GetKeyState("lbutton","P")
		{
			click
			sleep, 500
		}
	}
	return
#If

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: FortniteSpanishGuy, GEOVAN, Google [Bot], jollyjoe and 210 guests