Hello community. I've been using a convenience script for a long time but I thought it's about time I make some necessary changes.
First of all, how can I bind Mouseforward to resuming a script? Perhaps detect IF script is paused, and if so, execute 'pause' to resume?
On top of mouseforward, I'd like a double tap of the D key within one second to turn script back on, and stay on if it's already on.
Most importantly, how would I go on pausing the script if I press any key other than a couple specific keys, e.g A,D,G?
Thank you so much.
Resuming and pausing script flexibly
Re: Resuming and pausing script flexibly
Ideas:
Code: Select all
Loop, 512 ; Block the keyboard (pause script)
If A_Index not in 30,32,34 ; except a, d, g
Hotkey, % Format("*SC{:X}", A_Index), Pause, On UseErrorLevel
#If A_IsPaused
~d::
~SC3D::
If (A_PriorHotkey ~= "(~d|~SC3D)" && A_TimeSincePriorHotkey < 1000) ; Double-press
Pause, Off
Return
#If
Pause:
Pause, On, 1
Return
-
- Posts: 38
- Joined: 03 Dec 2016, 12:44
Re: Resuming and pausing script flexibly
Hello.
The script doesn't seem to work. For example I'd press 'J' instead of A/D/G after implementing the changes but the script would not pause.
Fyi I already use A and D for ctrl shift tab/ ctrl tab respectively. This might be why the double 'D' tap doesn't work.
Again, I'd like A,D,G,T to be the exceptions. I looked up A_index but nowhere does it show how 30,32,34 correspond to a,d,g. However, I did learn how to break a loop with A_index thanks to that.
Again, thank you for the help.
The script doesn't seem to work. For example I'd press 'J' instead of A/D/G after implementing the changes but the script would not pause.
Fyi I already use A and D for ctrl shift tab/ ctrl tab respectively. This might be why the double 'D' tap doesn't work.
Again, I'd like A,D,G,T to be the exceptions. I looked up A_index but nowhere does it show how 30,32,34 correspond to a,d,g. However, I did learn how to break a loop with A_index thanks to that.
Again, thank you for the help.
Re: Resuming and pausing script flexibly
Auto-execute section goes at the top. If you already have a script, then post it.