Auto Clicker Topic is solved

Ask gaming related questions (AHK v1.1 and older)
Te Waffles
Posts: 31
Joined: 01 Jul 2016, 21:31

Auto Clicker

02 Jul 2016, 23:05

Hello. I need an auto clicker script that clicks about 12 cps and is toggled using ctrl+z. Also I want the auto clicker to work even if my mouse is hovering over a game screen. For example, Minecraft or Roblox.
I have looked in the forums and have found lots of auto clickers, but the hotkeys aren't suited for the games I am playing or my browser.
neomulemi6
Posts: 216
Joined: 30 Jun 2016, 06:01

Re: Auto Clicker  Topic is solved

03 Jul 2016, 11:58

This will click 12 times/second, toggled on/off with ctrl + z.

Code: Select all

#MaxThreadsPerHotkey 3

^z::
Toggle := !Toggle
Loop
{
	If (!Toggle)
		Break
	Click
	Sleep 83 ; Make this number higher for slower clicks, lower for faster.
}
Return
Te Waffles
Posts: 31
Joined: 01 Jul 2016, 21:31

Re: Auto Clicker

04 Jul 2016, 23:52

Thx neomulemi6. It works perfectly!
budboradjong

Re: Auto Clicker

06 Jan 2018, 21:09

hi, can you please give me a script where it clicks the button automatically(without touching anything) and using F1 as start stop button.

Thank you.
F0RSAKEN

Re: Auto Clicker

20 Jan 2018, 02:57

budboradjong wrote:Hi, can you please give me a script where it clicks the button automatically(without touching anything) and using F1 as a start-stop button.

Thank you.

The last one I posted had a bug with pausing it so here is the improved one just copy paste it to one of your own. :)

~LButton::
Loop
{
GetKeyState, LButtonState, LButton, P
if LButtonState = U

MouseClick, Left

Sleep 10

}
return
*F1::
Suspend
Pause, 1
return

*F2::
ExitApp
return
MOPixels
Posts: 5
Joined: 25 Jan 2018, 18:13

Re: Auto Clicker

25 Jan 2018, 18:23

^z::
Toggle := !Toggle
Loop
{
If (!Toggle)
Break
Click
Sleep 83 ; Make this number higher for slower clicks, lower for faster.
}
Return

What's the point of including the Toggle := !toggle
and If (!Toggle) ?
break
GreatGazoo
Posts: 69
Joined: 28 Dec 2017, 02:53

Re: Auto Clicker

25 Jan 2018, 21:38

MOPixels wrote:^z::
Toggle := !Toggle
Loop
{
If (!Toggle)
Break
Click
Sleep 83 ; Make this number higher for slower clicks, lower for faster.
}
Return

What's the point of including the Toggle := !toggle
and If (!Toggle) ?
break
it's how to break the loop that would run continuously , or else it will run out of control with no way to turn it off
MOPixels
Posts: 5
Joined: 25 Jan 2018, 18:13

Re: Auto Clicker

26 Jan 2018, 22:29

Hm, I still don't really understand it. What I'm confused about, is really what Toggle := !Toggle is. Is Toggle a variable being asigned to !Toggle? But then wouldn't !Toggle also be a variable? And moreover, how would the computer know what !Toggle is, if it is to be a variable with no input?
gregster
Posts: 8886
Joined: 30 Sep 2013, 06:48

Re: Auto Clicker

26 Jan 2018, 22:52

"Toggle" is the only variable in this line. ! on the other hand, works as the logical "NOT" operator. (See ! and NOT here: https://autohotkey.com/docs/Variables.htm#operators.)
Now, the statement Toggle := !Toggle changes the contents of Toggle fromtrue to false and vice versa. Thus, a toggle...
GreatGazoo
Posts: 69
Joined: 28 Dec 2017, 02:53

Re: Auto Clicker

26 Jan 2018, 22:56

MOPixels wrote:Hm, I still don't really understand it. What I'm confused about, is really what Toggle := !Toggle is. Is Toggle a variable being asigned to !Toggle? But then wouldn't !Toggle also be a variable? And moreover, how would the computer know what !Toggle is, if it is to be a variable with no input?
The exclamation point just means "Not", so !Toggle being "not toggle" and in the script !toggle does something

https://autohotkey.com/docs/Variables.htm
Logical-not (!): If the operand is blank or 0, the result of applying logical-not is 1, which means "true". Otherwise, the result is 0 (false). For example: !x or !(y and z). Note: The word NOT is synonymous with ! except that ! has a higher precedence. [v1.0.46+]: Consecutive unary operators such as !!Var are allowed because they are evaluated in right-to-left order.

Code: Select all

#maxThreadsPerHotkey, 2
setKeyDelay, 50, 50
setMouseDelay, 50
banana:=0

$f1::
	; banana:=!banana .... This assigns banana to the value of NOT (!) banana. so lets
	; say banana starts out FALSE (0). you then turn banana to NOT FALSE. which is
	; TRUE (1). so now banana is set to TRUE. and then lets say you toggle it again.
	; you set banana to NOT TRUE, which is FALSE. banana is now set to FALSE. 
	; .... 1 is true, 0 is false. ! is NOT.
	banana:=!banana
	
	while (banana=1)
	{
		send, hello{space}
		sleep, 100
	}
return
MOPixels
Posts: 5
Joined: 25 Jan 2018, 18:13

Re: Auto Clicker

29 Jan 2018, 13:49

Okay, I am slowly getting it. However, in the autoclicker script, it says, "If (!Toggle)
break
So I assume that everytime you activate the hotkey, it will change the property of Toggle to True/False, which will then break it? What I don't get is if ! changes a variable to a qualitative or quantitative toggle?

When toggling the hotkey, will it change Toggle to True/False, or change the variable into 1/0?
MOPixels
Posts: 5
Joined: 25 Jan 2018, 18:13

Re: Auto Clicker

29 Jan 2018, 13:52

What I also want to question is that on the autoclicker script, it doesn't mention whether Toggle is set to True, or False. So do all variable start off as false?
MOPixels
Posts: 5
Joined: 25 Jan 2018, 18:13

Re: Auto Clicker

29 Jan 2018, 14:01

Code: Select all

^q::

toggle := !toggle

loop
{
	If (!toggle)
		break

	loop, 23
	{
	send, q
	Sleep 200
	}
		
	send, {Shift Down}
	Sleep 9000
	send, {Shift Up}
}
			
Return
This is my script, I think if you see this it will be easier to identify what is going on.
Mrcrazypants2
Posts: 1
Joined: 25 Dec 2018, 19:16

Re: Auto Clicker

25 Dec 2018, 19:26

just hit = to start or stop it

Code: Select all

Pause ON

loop
{
click
}

=::Pause
bigchill055
Posts: 1
Joined: 03 May 2020, 02:28

Re: Auto Clicker

03 May 2020, 02:31

hello im new to this whole scripting thing.. i just want a clicker for ingame where it just clicks automatically every 2 or so seconds that will stay on constantly till turned off.
snnail
Posts: 1
Joined: 04 May 2020, 12:11

Re: Auto Clicker

04 May 2020, 12:28

neomulemi6 wrote:
03 Jul 2016, 11:58
This will click 12 times/second, toggled on/off with ctrl + z.

Code: Select all

#MaxThreadsPerHotkey 3

^z::
Toggle := !Toggle
Loop
{
	If (!Toggle)
		Break
	Click
	Sleep 83 ; Make this number higher for slower clicks, lower for faster.
}
Return
NEw to this what should i do to change to right click?TIA
ButterZ
Posts: 7
Joined: 23 Feb 2019, 18:05

Re: Auto Clicker

14 May 2020, 02:15

snnail wrote:
04 May 2020, 12:28
neomulemi6 wrote:
03 Jul 2016, 11:58
This will click 12 times/second, toggled on/off with ctrl + z.

Code: Select all

#MaxThreadsPerHotkey 3

^z::
Toggle := !Toggle
Loop
{
	If (!Toggle)
		Break
	Click
	Sleep 83 ; Make this number higher for slower clicks, lower for faster.
}
Return
NEw to this what should i do to change to right click?TIA
You would change "click" to what ever button you want instead-
JustArtemis
Posts: 1
Joined: 07 Jun 2020, 03:28

Re: Auto Clicker

07 Jun 2020, 03:39

can someone please find me a script that just presses a button until I turn it off the button can be G and the start button is =
Shivaansh
Posts: 1
Joined: 21 Oct 2020, 07:30

Auto Clicker

21 Oct 2020, 07:40

Can someone please tell me the codes to make an autoclicker which works on a particular window?
Like I am doing stuff on internet and it is working on a chosen window without interfering?
kathyalex
Posts: 1
Joined: 03 Feb 2021, 00:07

Re: Auto Clicker

03 Feb 2021, 00:18

First of all thank you for the thread. I'm a Roblox fan and I want to make an auto clicker for Roblox anyone can guide me on how can I make Roblox Broken Link for safety auto clicker? One more thing is that it should not ban the Roblox account. Thanks

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 43 guests