Anyone has a script of an auto clicker that dosent use ur mouses cursor? Like u put it in a fixed postion and it clicks
Need HelpYes, I'll send it in a bit
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance,Force ;Only launch 1 instance of this script.
SetBatchLines, -1
CoordMode, Mouse, Relative
;Variables
isLoopStarted := False
x1 :=
y1 :=
x2 :=
y2 :=
x3 :=
y3 :=
;Shift alt right click to choose position, up to three positions
!+MButton::
if (x1 == "" AND y1 == "")
MouseGetPos, x1, y1
else if (x2 == "" AND y2 == "")
MouseGetPos, x2, y2
else if (x3 == "" AND y3 == "")
MouseGetPos, x3, y3
return
;Start the autoclicking loop
#If (isLoopStarted == False)
!+SC020::
isLoopStarted := True
Loop
{
;If you chose all three positions
if ((x1 != "" AND y1 != "") AND (x2 != "" AND y2 != "") AND (x3 != "" AND y3 != ""))
{
;Which position is clicked is chosen randomly
Random, int, 1, 3
if (int == 1)
ControlClick, X%x1% Y%y1%, A
else if (int == 2)
ControlClick, X%x2% Y%y2%, A
else if (int == 3)
ControlClick, X%x3% Y%y3%, A
;Click each position in a cycle
; ControlClick, X%x1% Y%y1%, A
; ControlClick, X%x2% Y%y2%, A
; ControlClick, X%x3% Y%y3%, A
}
;If you chose two different positions
else if ((x1 != "" AND y1 != "") AND (x2 != "" AND y2 != ""))
{
ControlClick, X%x1% Y%y1%, A
ControlClick, X%x2% Y%y2%, A
}
;If you only chose one position
else if ((x1 != "" AND y1 != ""))
ControlClick, X%x1% Y%y1%, A
}
return
#If
;Exit the script, meaning end loop. Works only after you actually start the loop
#If (isLoopStarted == True)
!+SC020::ExitApp
#If
So, how this works: you make a hotkey to run this script from a different script. You launch it with shift alt D, then use shift alt middle button to choose up to three places for the autoclicker to click on, then press shift alt D for it to start clicking. Then shift alt D once again to stop clicking, exiting the script.
Before posting, do you go line by line through your code and add `
before and after everything?
There are far FAR easier (and better) ways of doing this.
I recently explained text formatting to someone .
It goes over easy ways of formatting blocks of text.
so your code
looks like this
and retains indents
so code
is readable
+Easier
+Saves time
Nope, I tried using code block, but it only worked on the first line. Had a space before the code block and everything too. So I resorted to using "inline code"
Of course, there is an open source auto clicking suit, just use the 1st program :
Put what in a fixed position, like it activates only when your mouse pointer is in a defined position or something you can toggle on that clicks a certain position? Because click will let you input coordinates to where you want it to click in an active window, it's just a matter of modifying one of the many autoclickers to suite your needs after that. But as to the first idea where you'd move your mouse to a certain area on screen and it would automatically start clicking, that's above my head.