I've got a little script with SendInput commands running if "else if(ErrorLevel=1)" and I would like to pause it if "else if(ErrorLevel=0)" in order to run a different set of SendInput commands until "else if(ErrorLevel=1)" again. How can I do this?
Reading the docs for 'Pause' didn't help me understand how this can be done I tried doing whats in the code below but it doesn't work only PressTheKey works
Code: Select all
else if (ErrorLevel=1)
{
Loop,
PressTheKey:
{
Send, {space down}
Send, {F4 down}
Sleep 10
Send, {F4 up}
Send, {z down}
Sleep 10
Send, {z up}
Send, {1 down}
Sleep 10
Send, {1 up}
}
else if(ErrorLevel=0)
{
sleep 1000
SendInput, {ctrl down}
SendInput, {h down}
sleep 500
SendInput, {ctrl up}
SendInput, {h up}
SendInput, {f1 down}
sleep 1000
SendInput, {f1 up}
SendInput, {ctrl down}
SendInput, {h down}
sleep 500
SendInput, {ctrl up}
SendInput, {h up}
}