Rapid Fire left and right mouse click

Ask gaming related questions
Iedou812
Posts: 11
Joined: 01 Mar 2018, 19:12

Rapid Fire left and right mouse click

02 Mar 2018, 14:20

I want to make a script for rapid fire for both (left and right) mouse click buttons. Below is a script I found that works great, but is only for the left mouse button.

f9::Suspend
LButton::
Loop
{
SetMouseDelay 20
Click
If(GetKeyState("LButton","P")=0)
Break
}

Any help with the above request would be greatly appreciated.
Rohwedder
Posts: 1516
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Rapid Fire left and right mouse click

03 Mar 2018, 03:51

Hallo,
try:

Code: Select all

f9::Suspend
LButton::
RButton::
SetMouseDelay 20
While, (GetKeyState("LButton","P") Or GetKeyState("RButton","P"))
	Click
Return
Iedou812
Posts: 11
Joined: 01 Mar 2018, 19:12

Re: Rapid Fire left and right mouse click

03 Mar 2018, 16:45

First I want to thank you for your time with the above script but it doesn't work. The left and right mouse buttons only fire the (Left pistol), not the right click, (Right pistol).
I am playing an online game which allows me to use duelist (two pistols at once), left and right mouse clicks fires the guns, but I want to make them both rapid fire. Again, any
help would be greatly appreciated.
Last edited by Iedou812 on 04 Mar 2018, 17:14, edited 1 time in total.
Rohwedder
Posts: 1516
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Rapid Fire left and right mouse click

04 Mar 2018, 12:43

Hallo,
then try:

Code: Select all

f9::
	Suspend
	SetTimer, LClick, Off
	SetTimer, RClick, Off
Return
$LButton::SetTimer, LClick, 50
$LButton Up::SetTimer, LClick, Off
LClick:
	SetMouseDelay 20
	Click
Return
$RButton::SetTimer, RClick, 50
$RButton Up::SetTimer, RClick, Off
RClick:
	SetMouseDelay 20
	Click, right
Return
Iedou812
Posts: 11
Joined: 01 Mar 2018, 19:12

Re: Rapid Fire left and right mouse click

04 Mar 2018, 17:21

The above script works but I'm finding it very hard to press the left and right mouse click buttons at the same time.
"Is there any way you could incorporate a script into the above script, so I only need to press the left mouse click button to activate both the left and right mouse click buttons at the same time?"
Any help would be greatly appreciated.....
Rohwedder
Posts: 1516
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Rapid Fire left and right mouse click

05 Mar 2018, 01:26

Hallo,
then:

Code: Select all

f9::Suspend
LButton::
SetMouseDelay 20
While, GetKeyState("LButton","P")
{
	Click
	Click, right
}
Return
Iedou812
Posts: 11
Joined: 01 Mar 2018, 19:12

Re: Rapid Fire left and right mouse click

05 Mar 2018, 11:45

The above script works great. Its really comical how I shred my opponents up with the duelist pistols. I am sorry to say that I could only use the duelist pistols while running the script. If I try to use my rifle/scope, etc, the scope blinks on and off uncontrollably and I get slaughtered by my foes, lol. This is because i use my right click mouse button to use my scope. (Is there any way that you could incorporate a script into the above script to prevent this? Say perhaps like keep the rapid fire
on for the left mouse click button, but turn it off for the right click button
while in game with the press of a keyboard button?)

Again, I sincerely appreciate your time in helping me with the above scripts.
Rohwedder
Posts: 1516
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Rapid Fire left and right mouse click

06 Mar 2018, 03:09

Hallo,
pressing key "q" turns off the the right clicks:

Code: Select all

HotKey, q, Off
Return ;End of Auto-execute Section
q::Return
f9::Suspend
LButton::
	SetMouseDelay 20
	HotKey, q, On
	While, GetKeyState("LButton","P")
	{
		If !GetKeyState("q","P")
			Click, right
	}
	HotKey, q, Off
Return
Iedou812
Posts: 11
Joined: 01 Mar 2018, 19:12

Re: Rapid Fire left and right mouse click

06 Mar 2018, 10:22

I tried the above script and it stated:

Error at line 1.
Line Text: Hot Key, q, Off
Error: This line does not contain a recognized action.
The program will now exit.

Please look into this issue for me. I honestly thank you and always appreciate your time.
Rohwedder
Posts: 1516
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Rapid Fire left and right mouse click

06 Mar 2018, 10:37

Hallo,
try:

Code: Select all

MsgBox, %A_AhkVersion%
It should be 1.1.28.00
Iedou812
Posts: 11
Joined: 01 Mar 2018, 19:12

Re: Rapid Fire left and right mouse click

06 Mar 2018, 16:01

Where should I place the above script (MsgBox, %A_AhkVersion%) ? Should it go above the (HotKey, q, Off) ?
Iedou812
Posts: 11
Joined: 01 Mar 2018, 19:12

Re: Rapid Fire left and right mouse click

07 Mar 2018, 16:42

Could you please be more specific as how to or where to place the above script? I thank you for your time.
Rohwedder
Posts: 1516
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Rapid Fire left and right mouse click

08 Mar 2018, 01:54

Hallo,
see https://autohotkey.com/docs/Tutorial.htm#s82
It's a standalone script which displays your AHK version. The reason for the "Error at line 1" could be a completely outdated AutoHotkey version.
Iedou812
Posts: 11
Joined: 01 Mar 2018, 19:12

Re: Rapid Fire left and right mouse click

08 Mar 2018, 07:02

This AutoHotKey is all new to me. I will look into the above matter with my version. Again, I thank you and always appreciate your time.
Iedou812
Posts: 11
Joined: 01 Mar 2018, 19:12

Re: Rapid Fire left and right mouse click

08 Mar 2018, 18:57

I downloaded the latest version and got the above script to run, but when I press the left click button to fire, all the gun
does is shake back and forth rapidly. Please help with this matter. Again, I thank you and appreciate your time.
Last edited by Iedou812 on 09 Mar 2018, 11:57, edited 1 time in total.
Rohwedder
Posts: 1516
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Rapid Fire left and right mouse click

09 Mar 2018, 05:18

Hallo,
I had forgotten the Click command (Lbutton Click), but why gun does shake back and forth rapidly?
Try this:
Lbutton makes only left Clicks,
the combination Shift and Lbutton makes left and right Clicks.

Code: Select all

f9::Suspend
LButton::
+LButton::
	SetMouseDelay 20
	While, GetKeyState("LButton","P")
	{
		Click
		If GetKeyState("Shift")
			Click, right
	}
Return
Iedou812
Posts: 11
Joined: 01 Mar 2018, 19:12

Re: Rapid Fire left and right mouse click

09 Mar 2018, 11:56

I was able to get the above script to work. While pressing the shift key, I am able to press the left mouse click and make both
the left and right mouse click auto fire. (Could you make the script so as I wont have to continuously hold the shift key down when
auto fire is needed.) Just a simple one press of the shift key activates it on and off would greatly be appreciated.
Rohwedder
Posts: 1516
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Rapid Fire left and right mouse click

09 Mar 2018, 12:56

Hallo,
no problem!

Code: Select all

f9::Suspend
~Shift::
	RClick := !RClick
	ToolTip % RClick ? "On":"Off"
	KeyWait, Shift
	ToolTip
Return
LButton::
+LButton::
	SetMouseDelay 20
	While, GetKeyState("LButton","P")
	{
		Click
		If RClick
			Click, right
	}
Return
Iedou812
Posts: 11
Joined: 01 Mar 2018, 19:12

Re: Rapid Fire left and right mouse click

09 Mar 2018, 18:43

The above script works great. I want to thank you so much for helping me. You have clearly
done your good deed for the day. Again, I honestly thank you so much for your time.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 10 guests