#include #include #include Mover() Func Mover() ; Creates the GUI and shows it GUICreate ("Jiggler", 300, 100) GUISetState(@SW_SHOW) Global $idinput1 = GUICtrlCreateInput("", 20, 20, 20, 20) Global $idbuttn1 = GUICtrlCreateButton("Jiggle!", 50, 50,50,50) Time() EndFunc Func jiggle() $vmin = GUICtrlRead ($idinput1) Do $aPos = MouseGetPos() ; Slightly moves the mouse from the current position and back instantly MouseMove ($aPos[0]+3, $aPos[1]+3, 5) MouseMove ($aPos[0]-0, $aPos[1]-0, 5) Sleep(60000*($vmin)); Sleeps for $vmin minutes then returns jiggle and is currently an infinite loop. Until _GUICtrlButton_GetState($idbuttn1) = $BST_PUSHED Time() EndFunc Func Time() While 1 ;$vmin = 0 Switch GUIGetMsg() Case $idbuttn1 jiggle() EndSwitch WEnd EndFunc