Jump to content

Auto clicker


thenewkid
 Share

usefull or not  

7 members have voted

  1. 1. usefull or not

    • i think this is usefull
      7
    • i dont think it is usefull
      0
  2. 2. use it or not

    • i would use this
      4
    • i would not use this
      3


Recommended Posts

i made this script for a game i play that you have to click a lot and found it has a few more uses and i found a few on the net what you have to buy so heres a free one

things added

hotkey added for faster exit

all feedback wecome :shocked:

#include <GUIConstants.au3>
#include <Misc.au3>
Global $pos[2]

HotKeySet("{Esc}","_Exit")

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Autoclicker", 253, 136, 193, 115)
$Label1 = GUICtrlCreateLabel("How meny times to click", 16, 16, 118, 17)
$Label2 = GUICtrlCreateLabel("Where to click", 16, 40, 73, 17)
$Input_cks = GUICtrlCreateInput("", 152, 8, 41, 21)
$Input_X = GUICtrlCreateInput("", 152, 32, 41, 21)
$Input_Y = GUICtrlCreateInput("", 200, 32, 41, 21)
$Label3 = GUICtrlCreateLabel("What button to click", 16, 64, 100, 17)
$Radio_lt = GUICtrlCreateRadio("Left", 152, 64, 41, 17)
$Radio_rt = GUICtrlCreateRadio("Right", 200, 64, 49, 17)
$Button_whereck = GUICtrlCreateButton("Find where to click", 152, 88, 99, 17, 0)
$Button_go = GUICtrlCreateButton("Go", 48, 112, 51, 17, 0)
$Button_exit = GUICtrlCreateButton("Exit", 96, 112, 51, 17, 0)
GUICtrlSetState($Radio_lt, $GUI_CHECKED)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


Func Wheretoclick()
$dll = DllOpen("user32.dll")
While 1
    Sleep ( 250 )
    If _IsPressed("01", $dll) Then
$pos = MouseGetPos()
GUICtrlSetData($Input_X,$pos[0])
GUICtrlSetData($Input_Y,$pos[1])
ExitLoop
EndIf
WEnd
EndFunc

func gogo()
$sidelt = GUICtrlRead($Radio_lt)
$sidert = GUICtrlRead($Radio_rt)
if $sidelt = "1" Then
$side = "left"
EndIf
If $sidert = "1" Then
    $side = "right"
EndIf
$clicks =   GUICtrlRead($Input_cks)
$loop = "0"
GUISetState(@SW_HIDE)
While 1
MouseClick($side, $pos[0], $pos[1], 1)
MouseMove(0, 0, 0)
$loop += "1"
if $loop = $clicks Then
    MsgBox(0, "Autoclicker", "Finshed all clicks")
    GUISetState(@SW_SHOW)
    ExitLoop
EndIf
WEnd
EndFunc

Func _Exit()
Exit
EndFunc


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button_whereck
            Wheretoclick()
        case $Button_go
            gogo()
        Case $Button_exit
            Exit
    EndSwitch
WEnd

Auto_clicker.au3

Edited by thenewkid

some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with

Link to comment
Share on other sites

I like the idea of letting the user retrieve coordinates by where they click. Couple of suggestions..

Always put indents where necessary (will make script 10x easier to read)

Keep your UDF's at the bottom of the script

Also, maybe you could add in a timer to click every X seconds.. something like

$timer = TimerInit()
While 1
    If TimerDiff($timer) > GUICtrlRead($NewInputControlForDelay) Then
        MouseClick(....)
        $timer = 0
        $timer = TimerInit()
    EndIf
WEndoÝ÷ Ù.².ØZ½ëazWµÉbrFî¶Ú'uçÚº[^vÊuا¶¬{hÊ«BºÚ"µÍÕRPÝÙ]Ý]J  ÌÍÔY[×Û    ÌÍÑÕRWÐÒPÒÑQ

Kurt

Awaiting Diablo III..

Link to comment
Share on other sites

Why MouseMove back to 0,0. I don't get it.

i know that there is a few way of doing it but i found this way easyer to do its to slow down the time it takes to send the clicks

Edited by thenewkid

some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with

Link to comment
Share on other sites

  • 7 years later...
  • Developers

Seems you still haven't read our forum rules.

So this is the second time I close a thread you create or post in.

Third will not be without consequences.

Jos

EDIT: I see you were able to delete your post just before I locked it.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...