HotKeySet('^{DEL}', '_Exit'); Close script on Ctrl+Del
$fFirst = True;
$start = TimerInit()
While 1
If TimerDiff($start) >= $time_to_wait OR $fFirst Then; $time_to_wait In msecs
;Start of some stuff to do
;Some stuff
; End of stuff
$start = TimerInit()
$fFirst = False
EndIf
WEnd
Func _Exit()
Exit
EndFunc