I've made a makeshift universal pause function hack, which works by an external script controlling AutoIt's tray pause capability. Here's how it works,,, You Include the GlobalPause.au3 in your script, when you do that and run your script, it writes Pause.au3 to your script folder. Pause.au3 is the binary string which you see in GlobalPause.au3, it's just much neater to write it this way, The actual code of Pause.au3 is below. Your script (shown below as TestingPause.au3) needs everything
This is a Pause function designed to work with a button on gui, will not work with a hotkey too (as is).
Main thing to remember about this one is to add your button ID in the pause loop, where the one below is "$hPause"
HotKeySet("{Esc}", "_Exit")
$hGui = GUICreate("Gui Pause Button Example", 300, 80)
$hPause = GUICtrlCreateButton("Pause", 120, 24, 60)
GUISetState()
Global $Counter = 0 ; Not needed, just for demonstration purpose.
While 3
;Your code starts in this main loop
; Note that