3-key combination suspend not working as intended
Posted: 25 Mar 2019, 10:15
I'm having some issues with using the keys LShift + W/1 + 1/W to suspend and resume scripts. See below;
The code mostly works, where after holding down LShift, whichever order 1/2 or W is pressed, the script will suspend or resume.
The situation in which it doesn't work is when you press LShift, then press 1, then press W. It begins to flick between suspend and resume over and over again. This doesn't happen when 2 is pressed or in the reversed orders.
Does this script behave like this for anyone else?
What changes have to be made to have LShift + 1/W + W/1 suspend, but not resume over and over again?
Is there an easier way to have multiple key combinations suspend and resume scripts, if so, how?
Any insight would be greatly appreciated thank you!
Code: Select all
#if getkeystate("LShift","P")
1 & W::Suspend, Off
W & 1::Suspend, Off
#if
#if getkeystate("LShift","P")
2 & W::Suspend, On
W & 2::Suspend, On
#if
The situation in which it doesn't work is when you press LShift, then press 1, then press W. It begins to flick between suspend and resume over and over again. This doesn't happen when 2 is pressed or in the reversed orders.
Does this script behave like this for anyone else?
What changes have to be made to have LShift + 1/W + W/1 suspend, but not resume over and over again?
Is there an easier way to have multiple key combinations suspend and resume scripts, if so, how?
Any insight would be greatly appreciated thank you!