i get errors with the Parameter #2 on the command, my main problem is there are of cuse 2000 Topics for RapidFire, but all are for V1, and to adapt it into V2 seems more complicated then i thought
Note: i Tried severall combinations to get the misstake, i tried ("LButton","P":=1) , P0 , ("LButton","D"), ("LButton",'P') and ("LButton","P":=1) and !GetKeyState("LButton",'P')
her are my Script Parts
this is the On/Off Toggle:
Code: Select all
RapidFireFunction(*) {
Static on := False
if on := !on {
ComObject("SAPI.SpVoice").Speak("RapidFire Aktiviert")
SetTimer(RapidFire, 1)
} Else {
ComObject("SAPI.SpVoice").Speak("RapidFire Deaktiviert")
SetTimer(RapidFire, 0)
}
}
and RapidFire Left Mouse Button, when Pushed Down, Stop when Release Button, how i interpreted it:
Code: Select all
RapidFire() {
while GetKeyState("LButton","P":=1)
Loop {
SetMouseDelay(20)
Click
if GetKeyState("LButton","P":=0)
break
}
}
https://www.autohotkey.com/docs/v2/lib/GetKeyState.htm
Code: Select all
if !GetKeyState("NumpadAdd", "P") ; The key has been released, so break out of the loop.
break
Edit: i forgot:
with:
Code: Select all
RapidFire() {
while GetKeyState("LButton","P")
Loop {
SetMouseDelay(20)
Click
if GetKeyState("LButton","P")
break
}
}
how can i set the Loop to "off when release mouse button" ?
thanks for any help or lead into a direction
Tobgun1