Global $IsPaused = False
HotKeySet("{F11}", "Script_Kill")
HotKeySet("{DELETE}", "Script_Pause")
Func Script_Kill()
Exit
EndFunc
Func Script_Pause()
$IsPaused = Not $IsPaused
EndFunc
While 1
If _IsPressed(0x04) And $IsPaused = False Then
MouseClick ("left")
Sleep(30)
EndIf
WEnd
Func _IsPressed($sHexKey, $vDLL = 'user32.dll')
Local $a_R = DllCall($vDLL, "short", "GetAsyncKeyState", "int", '0x' & $sHexKey)
If @error Then Return SetError @error, @extended, False)
Return BitAND($a_R[0], 0x8000) <> 0
EndFunc