Example:
Script 1
Code: Select all
#InstallKeybdHook
F3::
two := !two
SoundBeep, 1000 + 500 * two
Return
numpad3::
breakLoop := False
While GetKeyState("numpad3", "P") {
If two {
Send, {a down}
sleep 30
Send, {a up}
Sleep 80
Send, {s down}
sleep 30
Send, {a down}
sleep 40
Send, {numpad8 down}
sleep 20
Send, {s up} {a up}
sleep 20
Send, {numpad8 up}
If breakLoop
Break
}
Else {
Send, {d down}
sleep 30
Send, {d up}
Sleep 80
Send, {s down}
sleep 30
Send, {d down}
sleep 40
Send, {numpad8 down}
sleep 20
Send, {s up} {d up}
sleep 20
Send, {numpad8 up}
If breakLoop
Break
}
}
Return
numpad3 Up::
breakLoop := True
Return
Script 2
Code: Select all
F3::
two := !two
SoundBeep, 1000 + 500 * two
Return
ctrl::
breakLoop := False
While GetKeyState("ctrl", "P") {
If two {
Send, {a down}
sleep 10
Send, {s down}
sleep 10
Send, {a up}
sleep 10
Send, {d down}
Sleep 10
Send, {s up}
sleep 10
Send, {s down}
Sleep 10
Send, {d up}
sleep 10
Send, {a down}
sleep 10
Send, {s up}
Send, {numpad4 down} {numpad7 down}
sleep 10
Send, {numpad4 up}
sleep 10
Send, {numpad7 up}
sleep 10
Send, {a up}
If breakLoop
Break
}
Else {
Send, {d down}
sleep 10
Send, {s down}
sleep 10
Send, {d up}
sleep 10
Send, {a down}
Sleep 10
Send, {s up}
sleep 10
Send, {s down}
Sleep 10
Send, {a up}
sleep 10
Send, {d down}
sleep 10
Send, {s up}
Send, {numpad4 down} {numpad7 down}
sleep 10
Send, {numpad4 up}
sleep 10
Send, {numpad7 up}
sleep 10
Send, {d up}}
If breakLoop
Break
}
}
Return
ctrl Up::
breakLoop := True
Return
when i press f3 the second script doesn't change. Is there a workaround this?