Pausing a script
Hi everyone, I'm trying to suspend a script with a label.
I've created two strings and the following hotkeys in the beginning of my script:
PauseStatus := "None"
PauseStatus2 := "Enabled"
Test2Label := "f2"
Test1Label := "f1"
Followed by the following labels:
Test2Label :
PauseStatus := "Test2"
Test1Label:
PauseStatus := "Test1"
And when I hit a hotkey, it goes to the label, etc etc.
key_pause_script := "NumpadSub"
HotKey, *%key_pause_script%, pause_script
Everything above works perfectly, minus some misc code that I've excluded to keep this short and simple. The problem is with the following script. With I hit NumpadSub to pause the script, the script successfully pauses but displays the wrong tooltip. Instead of displaying "Paused" it'll display Test2. I also can't get the script to unpause.
Here is the label:
pause_script:
if PauseStatus2 := "Working"
{
PauseStatus2 := "Paused"
Tooltip, Paused
SetTimer, ResetTooltip, -500
}
if PauseStatus2 := "Paused" and if PauseStatus := "Test1"
{
PauseStatus2 := "Working"
Tooltip, Test1
SetTimer, ResetTooltip, -500
}
if PauseStatus2 := "Paused" and if PauseStatus := "Test2"
{
PauseStatus2 := "Working"
Tooltip, Test2
SetTimer, ResetTooltip, -500
}
Suspend
return
Anyone have any ideas?