The Wiki for Tale 4 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.
If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.
Difference between revisions of "User:Sithid/Macros/AutoIT/Clicker"
From A Tale in the Desert
< User:Sithid | Macros | AutoIT
Jump to navigationJump to search (New page: Simple repeat clicker. Be sure to adjust the click delay( time between clicks ) within the script. Build, run, switch to atitd, and unpause( using pause key ). == The Macro == <pre> #cs...) |
|||
Line 9: | Line 9: | ||
Author: Sithid | Author: Sithid | ||
Date: 07.12.08 | Date: 07.12.08 | ||
− | Version: 1. | + | Version: 1.3 |
Script Function: | Script Function: | ||
Line 23: | Line 23: | ||
Global $Paused = False | Global $Paused = False | ||
− | Global $Delay = | + | Global $ClickPosSet = False |
+ | Global $ClickPos[2] | ||
+ | |||
+ | Global $Delay = 20000; time in ms between clicks | ||
HotKeySet( "{ESC}", "Terminate" ) | HotKeySet( "{ESC}", "Terminate" ) | ||
HotKeySet( "{PAUSE}", "TogglePause" ) | HotKeySet( "{PAUSE}", "TogglePause" ) | ||
+ | HotKeySet( "{F1}", "SetClickPos" ) | ||
WinWaitActive( "eGenesis Client" ); | WinWaitActive( "eGenesis Client" ); | ||
TogglePause() | TogglePause() | ||
+ | |||
+ | MsgBox( 0x0, "Click Location", "Please hover over the place you want to repeat click and press F1." ) | ||
+ | |||
+ | While Not $ClickPosSet | ||
+ | Sleep( 100 ) | ||
+ | WEnd | ||
Main() | Main() | ||
− | Func Main() | + | Func SetClickPos() |
+ | $ClickPos = MouseGetpos() | ||
+ | $ClickPosSet = True | ||
+ | EndFunc | ||
+ | |||
+ | Func Main() | ||
+ | Local $OldMouseLoc[2] | ||
Do | Do | ||
− | MouseClick( "left" ) | + | WinWaitActive( "eGenesis Client" ); |
+ | |||
+ | $OldMouseLoc = MouseGetPos() | ||
+ | MouseClick( "left", $ClickPos[0], $ClickPos[1], 1,1 ) | ||
+ | MouseMove( $OldMouseLoc[0], $OldMouseLoc[1], 1) | ||
+ | |||
Sleep( $Delay ) | Sleep( $Delay ) | ||
Until 1 = 2 | Until 1 = 2 |
Revision as of 19:35, 17 December 2008
Simple repeat clicker. Be sure to adjust the click delay( time between clicks ) within the script. Build, run, switch to atitd, and unpause( using pause key ).
The Macro
#cs -------------------------------------------------------------------------------------- AutoIt Version 3.2.12.1 Author: Sithid Date: 07.12.08 Version: 1.3 Script Function: Slate Collection - Automagical #ce -------------------------------------------------------------------------------------- #include <GUIConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt( "MustDeclareVars", 1 ) Global $Paused = False Global $ClickPosSet = False Global $ClickPos[2] Global $Delay = 20000; time in ms between clicks HotKeySet( "{ESC}", "Terminate" ) HotKeySet( "{PAUSE}", "TogglePause" ) HotKeySet( "{F1}", "SetClickPos" ) WinWaitActive( "eGenesis Client" ); TogglePause() MsgBox( 0x0, "Click Location", "Please hover over the place you want to repeat click and press F1." ) While Not $ClickPosSet Sleep( 100 ) WEnd Main() Func SetClickPos() $ClickPos = MouseGetpos() $ClickPosSet = True EndFunc Func Main() Local $OldMouseLoc[2] Do WinWaitActive( "eGenesis Client" ); $OldMouseLoc = MouseGetPos() MouseClick( "left", $ClickPos[0], $ClickPos[1], 1,1 ) MouseMove( $OldMouseLoc[0], $OldMouseLoc[1], 1) Sleep( $Delay ) Until 1 = 2 EndFunc Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100 ) WEnd EndFunc Func Terminate() Exit EndFunc
Downloadable version of script and exe will be around shortly, need to figure out how first :P.