Pause While loop by hotkey
问题 I want to pause an AutoIt script containing a While loop and some functions. But I am only able to close the script on HotKeySet() . How can I pause it? The script checks for changes on a part of screen (x,y coordinates are set in a config file) and takes screenshots after playing an alert sound. It doesn't stop the While loop when pushing the pause button. But closing the program works. Here is my code: Global $Paused, $counter = 0 HotKeySet("{1}", "TogglePause") HotKeySet("{2}", "Terminate"