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
Jump to navigationJump to search
Line 1: Line 1:
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 ).  When ingame, after unpause just follow the instructions from the message box.
+
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 ).  When ingame, after unpause just follow the instructions from the message box to set the click location.  When time to click, current mouse position is stored and then mouse is returned to that spot after it clicks the place you selected.  Good for stuff like fishing or digging etc.
  
 
== The Macro ==
 
== The Macro ==

Revision as of 19:37, 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 ). When ingame, after unpause just follow the instructions from the message box to set the click location. When time to click, current mouse position is stored and then mouse is returned to that spot after it clicks the place you selected. Good for stuff like fishing or digging etc.

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.