Sign in to follow this  
Followers 0
Ramzy

Auto Clicker

3 posts in this topic

#1 ·  Posted (edited)

Hi,

A very long time ago my friend and I made an auto clicking program. My friend was a lot better at programming scripts. I was basically just watching and learning as we went along. I would like to edit the script and add some improvements to it, but i'm a bit lost. Here are the changes i would like to make:

- I would like to bind the left and right mouse button to the auto clicker. Instead of pressing F9 / any other hotkey to start the auto clicker, i would instead like to simply press and hold the left mouse button to start the clicking process.

- I would like the auto clicker to STOP as soon as i let go of the button.

- Finally, if i wish to use a hotkey, i would like the script to detect what button i press, instead of manually having to key "{F9}" into the little dialog box. Instead, i would like to simply press F9 on my keyboard, or L, or what ever, and have the script automatically enter that in.

Thanks muttley

Here is the source of the script we made ages ago:

; <AUT2EXE VERSION: 3.1.1.0>

; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-START: C:\Documents and Settings\Ramzy\Desktop\Scripts\1 edit.au3>
; ----------------------------------------------------------------------------

; The script

MsgBox(0, "Ramzy's Auto Clicker", "Refer to the ReadMe file for more help using this program."  & @CRLF & " " & @CRLF & "Thanks and enjoy.")

$startclick = InputBox("Question", "Button to start left clicking", "{F9}", "", -1, -1, 0, 0)
$Rightclick = InputBox("Question", "Button to start right clicking", "{F10}", "", -1, -1, 0, 0)
$HK_STOP = InputBox("Question", "Button to stop all clicking commands", "{F11}", "", -1, -1, 0, 0)

HotKeySet($startclick, "startclick")
HotkeySet($HK_STOP, "HK_STOP")
Hotkeyset($Rightclick,  "Rightclick")
;HotKeySet("{F8}",  "Autobuff")

; This is the clicking function
Func startclick()
; Continuous loop that clicks the left mouse button
while(1)

; Starts the auto clicker
MouseClick("left")
Opt("MouseClickDelay", 10)
WEnd
EndFunc

Func Rightclick()
; Continuous loop that clicks the left mouse button
while(1)
MouseClick("Right")
WEnd
EndFunc

Func Autobuff()
While (1)
Send("2")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,25)
Opt("MouseClickDownDelay", 200)
Send("3")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,25)
Opt("MouseClickDownDelay", 200)
Send("6")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,25)
Opt("MouseClickDownDelay", 700)
Send("2")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,65)
Opt("MouseClickDownDelay", 200)
Send("3")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,65)
Opt("MouseClickDownDelay", 200)
Send("6")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,65)
Opt("MouseClickDownDelay", 700)
Send("2")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,105)
Opt("MouseClickDownDelay", 200)
Send("3")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,105)
Opt("MouseClickDownDelay", 200)
Send("6")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,105)
Opt("MouseClickDownDelay", 700)
Send("2")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,160)
Opt("MouseClickDownDelay", 200)
Send("3")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,160)
Opt("MouseClickDownDelay", 200)
Send("6")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,160)
Opt("MouseClickDownDelay", 700)
Send("2")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,195)
Opt("MouseClickDownDelay", 200)
Send("3")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,195)
Opt("MouseClickDownDelay", 200)
Send("6")
Opt("MouseCoordMode", 1)
MouseClick("Right",1226,195)
Opt("MouseClickDownDelay", 700)

Wend
Endfunc


; Stops the program
Func HK_STOP()
while 1 = 1
  Sleep(1000)
wend
EndFunc

; Need to keep the program running until you press the hotkey
while(1)
sleep(1000)
WEnd



; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-END: C:\Documents and Settings\SSHS4\My Documents\Autoit files\ac3.au3>
; ----------------------------------------------------------------------------


; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-END: C:\Documents and Settings\Ramzy\Desktop\Scripts\1 edit.au3>
; ----------------------------------------------------------------------------

AutoClicker.au3

Edited by Ramzy
1 person likes this

Share this post


Link to post
Share on other sites



awesome doing good job bro.

keep it up

Share this post


Link to post
Share on other sites

@boezi did you not see that this post is over 8 years old? Please don't resurrect old threads, especially when you aren't adding anything of value to them.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0