For as long as the right mouse click is held, also hold F

Ask gaming related questions (AHK v1.1 and older)
rillio
Posts: 1
Joined: 14 Dec 2017, 16:47

For as long as the right mouse click is held, also hold F

14 Dec 2017, 16:51

~$RButton::
While GetKeyState("RButton","P"){
Send {P down}
Click Right
Send {F}
Sleep 50 ; milliseconds
}
Send {P Up}
return

Here is what I got but it's not working at all.

I'm trying to make it to whenever I hold down the right click button, it also holds the F.
bryantan179
Posts: 74
Joined: 29 Mar 2017, 01:55

Re: For as long as the right mouse click is held, also hold F

15 Dec 2017, 05:21

try this

$RButton::
Loop
{
if not GetKeyState("RButton","P")
break
Send {F down}
}
Send {F up}
keywait ,RButton
TygerByte
Posts: 96
Joined: 12 Aug 2016, 05:22

Re: For as long as the right mouse click is held, also hold F

15 Dec 2017, 06:49

Ya'll might be making it more complex than it needs to be. If you don't need the F repeated you can do the following. I put in a hotkey to exit the script too. Personally I'd restrict it to a window or set a toggle, but this is just quick and easy.

Code: Select all

~$*RButton::F

F12::exitapp

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 87 guests