The toggle (should be working as intended):
Code: Select all
#If
F4::
op := !op
SoundBeep, 1000 + 500 * op
Return
#If
Code: Select all
#If (op)
Space::
while(GetKeyState("Space")) {
click,down
sleep 50 ;
click,up
sleep 50 ;
}
Return
#If
#If (op)
Space::
while(GetKeyState("Space")) {
SetKeyDelay, 0, 50
Send {Click}
}
Return
#If
#If (op)
Space::
while(GetKeyState("Space")) {
Send {LButton Down}
sleep 50
Send {LButton Up}
sleep 50
}
Return
#If
What am I doing wrong?