How to pause multiple toggle scripts with the same hotkey
Posted: 30 Jun 2020, 15:10
I've two different toggle scripts I would like to pause with the same hotkey.
I've tried some some and either they didn't work for both the same time or just didn't stopped the current one from spamming the keys that were toggled.
Anyway I was hoping someone with experience could help me please.
My first script
And my second one
Any help would be greatly appreciated
I've tried some some and either they didn't work for both the same time or just didn't stopped the current one from spamming the keys that were toggled.
Anyway I was hoping someone with experience could help me please.
My first script
Code: Select all
n1status := 0
n2status := 0
n3status := 0
n4status := 0
Send, {Numpad1 up}
Send, {Numpad2 up}
Send, {Numpad3 up}
Send, {Numpad4 up}
F1::
If( n1status = 0 ){
Send, {Numpad1 down}
n1status = 1
} Else If ( n1status = 1){
Send, {Numpad1 up}
n1status = 0
}
Return
F2::
If( n2status = 0 ){
Send, {Numpad2 down}
n2status = 1
} Else If ( n2status = 1){
Send, {Numpad2 up}
n2status = 0
}
Return
F3::
If( n3status = 0 ){
Send, {Numpad3 down}
n3status = 1
} Else If ( n3status = 1){
Send, {Numpad3 up}
n3status = 0
}
Return
F4::
If( n4status = 0 ){
Send, {Numpad4 down}
n4status = 1
} Else If ( n4status = 1){
Send, {Numpad4 up}
n4status = 0
}
Return
Code: Select all
toggle=0
F5::
If (toggle := !toggle)
SetTimer, Timer, -1
return
timer:
while toggle
{
send 5
Random, Time, 4900, 5000
Sleep, Time
}
return