rendered paste body#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Teriau\Downloads\koda_1.7.2.0\Forms\Tab.kxf
$AutoAO = GUICreate("AutoAO", 218, 444, 194, 125)
$tab = GUICtrlCreateTab(0, 0, 217, 441)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
; SBox Start
$SBoxTitle = GUICtrlCreateTabItem("SBox")
$SBoxLabel = GUICtrlCreateLabel("Box Coords", 52, 41, 113, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$SX1 = GUICtrlCreateInput("SX1", 52, 73, 41, 21)
$SY1 = GUICtrlCreateInput("SY1", 124, 73, 41, 21)
$crosslabel1 = GUICtrlCreateLabel("X", 100, 73, 16, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Label3 = GUICtrlCreateLabel("Item Coords", 52, 105, 116, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$SX2 = GUICtrlCreateInput("SX2", 52, 137, 41, 21)
$SY2 = GUICtrlCreateInput("SY2", 124, 137, 41, 21)
$crosslabel2 = GUICtrlCreateLabel("X", 100, 137, 16, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$SStart = GUICtrlCreateButton("Start", 60, 401, 89, 33, $WS_GROUP)
$SBoxloopLabel = GUICtrlCreateLabel("Loops", 76, 176, 61, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$SBoxLoop = GUICtrlCreateInput("1", 84, 217, 41, 21)
; Sbox End
; NBox Start
$NBoxTab = GUICtrlCreateTabItem("NBox")
$NboxLabel = GUICtrlCreateLabel("Box Coords", 52, 41, 113, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$NX1 = GUICtrlCreateInput("NX1", 52, 73, 41, 21)
$NY1 = GUICtrlCreateInput("NY1", 124, 73, 41, 21)
$crosslabel3 = GUICtrlCreateLabel("X", 100, 73, 16, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$NStart = GUICtrlCreateButton("Start", 60, 401, 89, 33, $WS_GROUP)
$NBoxLoopLabel = GUICtrlCreateLabel("Loops", 76, 112, 61, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$NBoxLoop = GUICtrlCreateInput("1", 84, 153, 41, 21)
; NBox End
; Dismantle Start
$DTab = GUICtrlCreateTabItem("Dismantle")
$DBoxLabel = GUICtrlCreateLabel("Box Coords", 52, 41, 113, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$DX1 = GUICtrlCreateInput("DX1", 52, 73, 41, 21)
$DY1 = GUICtrlCreateInput("DY1", 124, 73, 41, 21)
$crosslabel4 = GUICtrlCreateLabel("X", 100, 73, 16, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$DBoxlabel2 = GUICtrlCreateLabel("Auto Coords", 44, 177, 120, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$DX2 = GUICtrlCreateInput("DX2", 52, 209, 41, 21)
$DY2 = GUICtrlCreateInput("DY2", 124, 209, 41, 21)
$crosslabel5 = GUICtrlCreateLabel("X", 100, 209, 16, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$DStart = GUICtrlCreateButton("Start", 60, 401, 89, 33, $WS_GROUP)
$DLoopLabel = GUICtrlCreateLabel("Loops", 76, 312, 61, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$DLoop = GUICtrlCreateInput("1", 84, 361, 41, 21)
$DBoxLabel2 = GUICtrlCreateLabel("Dismantle Coords", 20, 241, 168, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$DY3 = GUICtrlCreateInput("DY3", 124, 281, 41, 21)
$DLabel3 = GUICtrlCreateLabel("X", 100, 281, 16, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$DX3 = GUICtrlCreateInput("DX3", 52, 281, 41, 21)
$HammerLabel = GUICtrlCreateLabel("Hammer Coords", 28, 105, 156, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$DX4 = GUICtrlCreateInput("DX4", 52, 145, 41, 21)
$Label17 = GUICtrlCreateLabel("X", 100, 145, 16, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$DY4 = GUICtrlCreateInput("DY4", 124, 145, 41, 21)
; Dismantle End
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("z","mousepos")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $SStart
SStart()
Case $NStart
NStart()
Case $DStart
DStart()
EndSwitch
WEnd
; Functions
Func SStart()
$i = 0
Do
$i = $i + 1
MouseMove(GuiCtrlRead($SX1),GuiCtrlRead($SY1))
MouseClick("right")
Sleep(750)
MouseMove(GuiCtrlRead($SX2),GuiCtrlRead($SY2))
MouseClick("left")
MouseClick("left")
SLeep(500)
Until $i = GuiCtrlRead($SBoxLoop)
EndFunc
Func NStart()
$i = 0
Do
$i = $i + 1
MouseMove(GuiCtrlRead($NX1),GuiCtrlRead($NY1))
MouseClick("right")
SLeep(4500)
Until $i = GuiCtrlRead($NBoxLoop)
EndFunc
Func DStart()
$i = 0
Do
$i = $i + 1
MouseMove(GuiCtrlRead($DX1),GuiCtrlRead($DY1)) ; Box Coords
MouseClick("right")
Sleep(3500)
MouseMove(GuiCtrlRead($DX4),GuiCtrlRead($DY4)) ; Hammer Coords
MouseClick("Right")
SLeep(500)
MouseMove(GuiCtrlRead($DX2),GuiCtrlRead($DY2)) ; Auto Coords
MouseCLick("Left")
SLeep(500)
MouseMove(GuiCtrlRead($DX3),GuiCtrlRead($DY3)) ; Dismantle Coords
MouseCLick("Left")
SLeep(4500)
Until $i = GuiCtrlRead($DLoop)
EndFunc
Func mousepos()
$pos = MouseGetPos()
MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1])
EndFunc
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc