Xoenix Posted September 11, 2005 Posted September 11, 2005 This is my code so far. Quote #include <GuiConstants.au3>GuiCreate("Auto Clicker", 348, 223, 366,266)$n = GUICtrlCreatePic(@Systemdir & "\oobe\images\wpakey.jpg",0,0, 366,266)GuiCtrlSetState($n, $GUI_DISABLE)$Button1 = GuiCtrlCreateButton("Auto Clicker On", 80, 72, 120, 33)$Button2 = GuiCtrlCreateButton("Auto Clicker Off", 80, 112, 120, 33)GuiSetState()While 1$msg = GuiGetMsg()SelectCase $msg = $GUI_EVENT_CLOSEExitLoopCase $msg = $Button1 ;On ButtonClicker()Case $msg = $Button2 ;Off ButtonExitCase Else;;;EndSelectWEndExit;ClickerFunc Clicker()While 1WinWaitActive("MapleStory")MouseClick ("left")WEndEndFuncAs you can see its an Auto Clicker, very simple. The only problem im have is that after I start it, pressing the off button doesnt stop it, and i need to Ctrl Alt Delete to exit, quite annoying. So a lil help would be awesome
GaryFrost Posted September 11, 2005 Posted September 11, 2005 (edited) Try something like HotKeySet: expandcollapse popup#include <GuiConstants.au3> HotKeySet("{Esc}", "_Stop") Global $Clicking = 0 GUICreate("Auto Clicker", 348, 223, 366, 266) $n = GUICtrlCreatePic(@SystemDir & "\oobe\images\wpakey.jpg", 0, 0, 366, 266) GUICtrlSetState($n, $GUI_DISABLE) $Button1 = GUICtrlCreateButton("Auto Clicker On", 80, 72, 120, 33) $Button2 = GUICtrlCreateButton("Auto Clicker Off", 80, 112, 120, 33) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1;On Button $Clicking = 1 Clicker() Case $msg = $Button2;Off Button $Clicking = 0 Case Else ;;; EndSelect WEnd Exit ;Clicker Func Clicker() While $Clicking WinWaitActive("MapleStory") MouseClick("left") WEnd EndFunc ;==>Clicker Func _Stop() $Clicking = 0 EndFunc ;==>_Stop Edited September 11, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now