I'm trying to get this script going to suspend and unsuspend some hotkeys but it's not working in a very odd way.
After running the script I am able to suspend the script using the hotkey once, then it doesn't work. Then, if I manually unsuspend the script and use the hotkey to suspend it gives me the message "Script unsuspended!" even though it already was unsuspended. After that I can press the hotkey to suspend one more time and it doesn't work after that again.
Help would be appreciated, thanks.
Code: Select all
; Hotkey to toggle suspension
^+`::
if (ScriptSuspended) {
; If the script is currently suspended, unsuspend it
Suspend, Off
ScriptSuspended := false
MsgBox, Script unsuspended!
} else {
; If the script is not suspended, suspend it
Suspend, On
ScriptSuspended := true
MsgBox, Script suspended!
}
return
*Space::LButton
*RALT::Space
*RCtrl::MButton
Up::Send {WheelUp}
Down::Send {WheelDown}