Simple Auto Clicker Scripts

DataMine
by DataMine · 2 posts
1 year ago in Autoit
Posted 1 year ago · Author
Below are some Autoit scripts I wrote to automate clicking in games and other applications.

Script #1

The first script is a basic auto clicker, it will run continuously until told to stop.
Code
#include <misc.au3>
#include <AutoItConstants.au3>

HotKeySet("{F1}", "Start")
HotKeySet("{F2}", "Stop")
HotKeySet("{ESC}", "Terminate")

Global $bStop = False
Global $bDisplayTrayTip = True

;~ The mouse button to click with
;~ See https://www.autoitscript.com/autoit3/docs/functions/MouseClick.htm for a list of mouse buttons
Global $sMouseButton = $MOUSE_CLICK_LEFT

While 1
   Sleep(100)
Wend

Func Start()
   $bStop = False
   While Not $bStop    
     If $bDisplayTrayTip Then
       TrayTip("Auto Clicker", "Enabled", 0)
       $bDisplayTrayTip =  False
     EndIf
     MouseClick($sMouseButton)    
   WEnd
EndFunc

Func Stop()
   $bStop = True
   TrayTip("Auto Clicker", "Disabled", 0)
   $bDisplayTrayTip = True
EndFunc

Func Terminate()
   Exit 0
EndFunc


Script #2

This second script is a slightly more advanced version of the first. It requires holding down a key in order to run. By default the key is
CTRL
. This script is meant for scenarios where you need finer control over when the script clicks such as crafting in a video game.
Code
#include <misc.au3>
#include <AutoItConstants.au3>

HotKeySet("{F1}", "Start")
HotKeySet("{F2}", "Stop")
HotKeySet("{ESC}", "Terminate")

Global $bStop = False
Global $bDisplayTrayTip = True

;~ The key code for the key that must be pressed to activate the auto clicker
;~ See https://www.autoitscript.com/autoit3/docs/libfunctions/_IsPressed.htm for a list of key codes
Global $iActivationKey = 11

;~ The mouse button to click with
;~ See https://www.autoitscript.com/autoit3/docs/functions/MouseClick.htm for a list of mouse buttons
Global $sMouseButton = $MOUSE_CLICK_LEFT

While 1
   Sleep(100)
Wend

Func Start()
   $bStop = False
   While Not $bStop
     If _IsPressed($iActivationKey) Then
       If $bDisplayTrayTip Then
         TrayTip("Auto Clicker", "Enabled", 0)
         $bDisplayTrayTip =  False
       EndIf
       MouseClick($sMouseButton)
     EndIf
   WEnd
EndFunc

Func Stop()
   $bStop = True
   TrayTip("Auto Clicker", "Disabled", 0)
   $bDisplayTrayTip = True
EndFunc

Func Terminate()
   Exit 0
EndFunc


Customization

To change which mouse button the scripts use, edit this line:
Code
Global $sMouseButton = $MOUSE_CLICK_LEFT


To change which key must be pressed for the second script, edit this line:
Code
Global $iActivationKey = 11


How do I use these scripts?

To learn how to use these scripts, see my tutorial on compiling AutoIT scripts here: viewtopic.php?f=113&t=12150


References

Key Code List: https://www.autoitscript.com/autoit3/do ... ressed.htm
Mouse Button List https://www.autoitscript.com/autoit3/do ... eClick.htm
Posted 1 year ago
woowww, i need your help. Can you please tell me how to use stuff from here to mobile imvu. If a buy something from here and I want to use it on my mobile imvu then how it can be possible?
i guess you may help me as you are so intelligent and smart and knows the programming and coding so well. are you the software engineer in real?

Create an account or sign in to comment

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

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

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

REGISTER A NEW ACCOUNT
Select a forum Protection     Help & Support     Introductions     Mafia News     IMVU News General Discussion     IMVU Lounge        IMVU Series / Roleplaying        Social Games     Mafia Market     Mafia Tools        Premium IMVU Tools        Off Topic Tools     Off Topic     Contests Creator Corner     Graphics Design        Photoshop        GIMP     Basic Creator Help     Catalog And Product Showcase     3D Meshing        3Ds Max        Sketchup        Blender Gangsters with Connections     White Hat Activities        Google Hacking        Trackers Programming Corner     Coding        Python        .Net (C#, VB, etc)        Flash        JAVA        Autoit        Batch        HTML & CSS        Javascript        PHP        Other        IMVU Homepage Codes           General           About me Panel           Messages Panel           Special Someone Panel           Visitors Panel           New Products Panel           Rankings Panel           Wishlist Panel           My Badges Panel           Outfits Panel           Url Panel           Groups Panel           Slideshow Panel           My Room Panel           Sandbox panel           Layouts     Help & Requests Free Credits     Approved Methods     Submit Methods Free Money     Approved Methods     Submit Methods Adult Corner     Get Mafia AP Here     AP Lounge        AP Social Games        Casual Dating Tips     IMVU Slave Market & Escorts