Battlefield 1 rapidfire script

Ask gaming related questions (AHK v1.1 and older)
User avatar
Synkro
Posts: 6
Joined: 30 Nov 2016, 17:23

Battlefield 1 rapidfire script

30 Nov 2016, 17:33

Hi,

I have tried to get a working Battlefield 1 rapidfire script but nothing seems to work so far,

Code: Select all

~LAlt & LButton::
    While GetKeyState("LButton","P"){
        Click
        Sleep 50  ;  milliseconds
    }
return
Works great in my browser, not ingame, tried the code i found in this thread: https://autohotkey.com/boards/viewtopic ... 18&t=24493

Code: Select all

SetMouseDelay, 20                        ; Set our Mouse Click delay to 20ms
#if WinActive("ahk_exe bf1.exe")             ; Any Hotkey Declared below will only be Active if Battlefield 1 is Active

$*~LButton::                                  ; Hotkey Left Mouse Button, * means trigger always (even on Key Combos), ~ Passes our initial Mouse Click through
    while GetKeyState("LButton", "P"){       ; Loop while we are holding Left Mouse Button down
        If (A_TimeSinceThisHotkey > 100){     ; If you have been holding the button longer than 100ms 
            mouseClick                       ; Send a  left mouse click!
		}
		Sleep 50							; Adjust this as needed. 1000 divided by # of rounds per second.
	}
return
Even though i want a script where i have to hold down alt + click to rapidifre (like the first script) i tried it like it is just to see if it works, it didnt. Can anyone help me out with this? It would be much appreciated!
User avatar
Almost_there
Posts: 404
Joined: 30 Sep 2014, 10:32

Re: Battlefield 1 rapidfire script

30 Nov 2016, 17:49

Does "Click" work ingame otherwise?

You could try using "Send {LButton down}" and "Send {LButton up}" instead of "Click". Cannot tell if it will work.
User avatar
Synkro
Posts: 6
Joined: 30 Nov 2016, 17:23

Re: Battlefield 1 rapidfire script

30 Nov 2016, 18:55

Both didnt seem to work either :(
User avatar
Synkro
Posts: 6
Joined: 30 Nov 2016, 17:23

Re: Battlefield 1 rapidfire script

30 Nov 2016, 19:40

V for Vendetta wrote:
Synkro wrote:Both didnt seem to work either :(
Do you run the game as Administrator?
I always do.
User avatar
V for Vendetta
Posts: 105
Joined: 29 Sep 2016, 11:33

Re: Battlefield 1 rapidfire script

30 Nov 2016, 19:41

Synkro wrote:
V for Vendetta wrote:
Synkro wrote:Both didnt seem to work either :(
Do you run the game as Administrator?
I always do.
Do you run the script as Administrator?
User avatar
Synkro
Posts: 6
Joined: 30 Nov 2016, 17:23

Re: Battlefield 1 rapidfire script

30 Nov 2016, 19:47

V for Vendetta wrote:
Synkro wrote:
V for Vendetta wrote:
Synkro wrote:Both didnt seem to work either :(
Do you run the game as Administrator?
I always do.
Do you run the script as Administrator?
This made it work, thought running ahk as admin would suffice but i was wrong, thank you so much!
User avatar
V for Vendetta
Posts: 105
Joined: 29 Sep 2016, 11:33

Re: Battlefield 1 rapidfire script

30 Nov 2016, 19:58

Synkro wrote: This made it work, thought running ahk as admin would suffice but i was wrong, thank you so much!
Just clarify me this:

Running the game as Administrator and the script as Administrator did not work?

but

Running the game not as Administrator and the script not as Administrator did work?
User avatar
Synkro
Posts: 6
Joined: 30 Nov 2016, 17:23

Re: Battlefield 1 rapidfire script

01 Dec 2016, 05:10

V for Vendetta wrote:
Synkro wrote: This made it work, thought running ahk as admin would suffice but i was wrong, thank you so much!
Just clarify me this:

Running the game as Administrator and the script as Administrator did not work?

but

Running the game not as Administrator and the script not as Administrator did work?
Sorry for the late reply, ISP had some issues last night.

Running the game as admin and the script not as admin didnt work, running both the game and the script as admin did work. With my previous reply I ment that by running the autohotkey.exe process as admin it would suffice for any script to be running as admin that way, but i had to rightclick the .ahk script and run as admin for it to actually be running as admin (as you suggested), if you know what im trying to say :)
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Battlefield 1 rapidfire script

01 Dec 2016, 09:35

The mouse click is possibly not being held for long enough for the game to recognize it.

SetMouseDelay controls the amount of time to wait AFTER each click, not the amount of time between the down event and the up event.

Try this:

Code: Select all

~$LAlt & LButton::
    While GetKeyState("LButton","P"){
        Send {LButton down}
        Sleep 50
        Send {LButton up}
        Sleep 50  ;  milliseconds
    }
return
User avatar
V for Vendetta
Posts: 105
Joined: 29 Sep 2016, 11:33

Re: Battlefield 1 rapidfire script

01 Dec 2016, 11:01

Synkro wrote: Sorry for the late reply, ISP had some issues last night.

Running the game as admin and the script not as admin didnt work, running both the game and the script as admin did work. With my previous reply I ment that by running the autohotkey.exe process as admin it would suffice for any script to be running as admin that way, but i had to rightclick the .ahk script and run as admin for it to actually be running as admin (as you suggested), if you know what im trying to say :)
Now I understand! Thanks for the clarification!
User avatar
Synkro
Posts: 6
Joined: 30 Nov 2016, 17:23

Re: Battlefield 1 rapidfire script

01 Dec 2016, 15:52

V for Vendetta wrote:
Synkro wrote: Sorry for the late reply, ISP had some issues last night.

Running the game as admin and the script not as admin didnt work, running both the game and the script as admin did work. With my previous reply I ment that by running the autohotkey.exe process as admin it would suffice for any script to be running as admin that way, but i had to rightclick the .ahk script and run as admin for it to actually be running as admin (as you suggested), if you know what im trying to say :)
Now I understand! Thanks for the clarification!
No problem, thank you! :)

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 66 guests