Global $fPause = True, $i = 0
HotKeySet('1', '_Pause')
HotKeySet('2', '_Work')
HotKeySet('3', '_Exit')
While 1
If $fPause Then
ToolTip('Value of $i is: ' & $i, 0, 0)
$i += 1
If $i = 100000 Then
$i = 0
EndIf
EndIf
Sleep(100)
WEnd
Func _Pause()
$fPause = False
ToolTip('Pause', 0, 0)
EndFunc ;==>_Pause
Func _Work()
$fPause = True
EndFunc ;==>_Work
Func _Exit()
Exit
EndFunc ;==>_Exit