Background autoclicker

Ask gaming related questions (AHK v1.1 and older)
Capbell
Posts: 1
Joined: 11 Mar 2024, 14:47

Background autoclicker

11 Mar 2024, 14:52

hi i am very new to coding and i found a script to autoclick in the background but it only works on a specific program and im trying to change it to work on Roblox
Here is the script

Code: Select all

#SingleInstance Force
F1:: ;Hotkey that starts the magic.
{	WinGet Win, MinMax, Tester ;Gets the status of the targeted window or game.
	IfEqual Win, 0, WinMinimize, Tester ;Minimize Testerwindow
	SetTimer, Clicker, 100 ;Turns on the timerloop. 100*10 = 1 second.
	SetTimer, 1sec, 1000 ;Turns on the timerloop. 1000 = 1 second.
} Return

Clicker:
{	IfWinExist, Tester
	{	WinGet Win, MinMax, Tester
		If (Win = -1) Or (Win = 1) Or (Win = 0) ;Makes sure if the window is Minimize/WinMaximize or somewhere in-between.
		{	
			ControlClick, x121 y79, Tester  ;The clicker command taht send the clicks to the targeted window.
			CountingClicks += 1 ;records each click
			If (CountingClicks = 10) ;When 10 clicks are sent it will trigger the code below.
			{	
				SetTimer, Clicker, OFF ;turns off the timerloop
				If (Win = -1) ;If WinMinimize
				{	IfEqual Win, -1, Winrestore, Tester ;Restores Tester Window from being Minimized.
				} CountingClicks := 0 ;resets the counder to 0
				MsgBox, 10 Clicks in 1 second ;Tells you when finished.
			}
		}
	} 
	Else,
	{	
		SetTimer, Clicker, OFF
		MsgBox, Tester Window Not Found!
	}
} Return
1sec:
{	SoundBeep, 400, 50 ;Beeps after 1 second
	SetTimer, 1sec, Off
} Return
~Esc::ExitApp ;Kills the script
Last edited by joedf on 11 Mar 2024, 15:02, edited 1 time in total.
Reason: fix [code] tags
User avatar
V0RT3X
Posts: 244
Joined: 20 May 2023, 21:59
Contact:

Re: Background autoclicker

12 Mar 2024, 07:14

Welcome to AutoHotkey V1!

There are a lot of already built Roblox auto clickers. One of them may work for you, or at least help to show you how to alter your script.
https://www.autohotkey.com/search/?q=roblox+autoclicker

To change the specific program (known as WinTitle in AHK) in your provided script, please review AHK documentation...
https://www.autohotkey.com/docs/v1/misc/WinTitle.htm

Also, please note the remark by Administrator joedf.
In the "Full Editor & Preview", highlight code and click the 5th button from the left.
Depending on the board style you are using, it will either have the word 'Code' or the symbol '</>' on it.

Code: Select all

It will then look something like this and be much easier for folks to help you moving forward.
Best of luck on your AHK/gaming adventures!!

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Bing [Bot] and 17 guests