Jump to content

Autoclicker


AngelSL
 Share

Recommended Posts

I'd like to thank star2 and Mr Icekirby for helping me on my first script.

#cs
Thanks to Mr Icekirby and star2 on the AutoIt Forums for helping me on this one.
Copyright © 2007 K9-Net Productions
#ce
#NoTrayIcon
#include <GUIConstants.au3> ; GUI Constants
#include <Misc.au3>    ; important
; #include <XSkin.au3>  ; Skin
$dll = DllOpen("user32.dll")
;$skin = @SCRIPTDIR & ""
$Form1_1 = GUICreate("AngelSL's Autoclicker", 331, 100, 367, 568)
$Group1 = GUICtrlCreateGroup("Autoclicker", 8, 0, 313, 70)
$Input1 = GUICtrlCreateInput("0", 112, 24, 193, 21)
$Label1 = GUICtrlCreateLabel("Delay per click (milliseconds)", 16, 30, 91, 30)
$MenuItem1 = GUICtrlCreateMenuitem("Start Clicking > F11", -1)
$MenuItem3 = GUICtrlCreateMenuitem("Stop Clicking > F12", -1)
$MenuItem2 = GUICtrlCreateMenuitem("Exit", -1)
$splash = "D:/Autoclicker_Splash.jpg"
SplashImageOn("AngelSL's Autoclicker", $splash, 302, 172, -1, -1, 1)
Sleep(2000)
SplashOff()
GUISetState(@SW_SHOW)





While 1
    $nMsg = GUIGetMsg()
If $nMsg = $GUI_EVENT_CLOSE Then Exit
    ;  If $nMsg = $Button1 Then
    ;from here u make the action loops until another event is present
    ;      Do
    ;         MouseClick("left")
    ; and here is the stop event
    ;     Until _IsPressed(75,$dll)  ;75 is the No for F6
    ; EndIf
    $speed = GUICtrlRead($Input1)
    Opt("MouseClickDelay", $speed)
    If _IsPressed("7A", $dll) Then
        Do
            MouseClick("left")
        Until _IsPressed("7B", $dll)
    EndIf

    If GuiGetMsg() = $MenuItem2 Then
        GUISetState(@SW_HIDE)
        ;MsgBox(4, "AngelSL's Autoclicker", "Exit?")
        $MsgBox = MsgBox(4, "AngelSL's Autoclicker", "Exit?")
        If $MsgBox = 7 Then
            GUISetState(@SW_Show)
        Else
            Exit
        EndIf
    EndIf
WEnd

DllClose($dll)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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