[ autoit ]
;;;; Mouse Motion Global $Paused, $counter = 0 HotKeySet("{F2}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage") Func Start() While 1 MouseClick("Primary",1398,830) MouseClick("Primary",827,713) MouseClick("Primary",963,459) wEnd EndFunc While 1 $counter +=1 ToolTip('Script is "Running"',0,0, $counter, 1) Sleep(700) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0, $counter, 1) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc
I cannot seem to put a function and a toggle pause key together. if someone could helpfully point me towards the right path i would be grateful.