AHK for Shooter

Ask gaming related questions (AHK v1.1 and older)
Yaruqii
Posts: 32
Joined: 11 Jul 2021, 16:29

AHK for Shooter

14 Oct 2021, 13:19

Has someone, or can someone code me an AHK, that is compatible with any shooter Game, which when i hold down the left mouse button, it automatically drags doen, maybe with a variable where I can easily change how fast it drags down?
Thanks!
Rohwedder
Posts: 7622
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: AHK for Shooter

14 Oct 2021, 15:29

Hallo,
is compatible with any shooter Game? Hardly!
Try:

Code: Select all

DragDown = 4 ; Speed
~*LButton::SetTimer, DragDown, 1
~*LButton Up::SetTimer, DragDown, Off
DragDown:
SetMouseDelay, -1
MouseMove, 0, %DragDown%, 0, R
Return
Yaruqii
Posts: 32
Joined: 11 Jul 2021, 16:29

Re: AHK for Shooter

15 Oct 2021, 10:07

I thank you really much, it works for WarZone. When I want the speed slower than 1, what should I type, cause e.g. 0,5 is not working!
Thanks!
Yaruqii
Posts: 32
Joined: 11 Jul 2021, 16:29

Re: AHK for Shooter

15 Oct 2021, 10:16

@Rohwedder Could you also add a Key to toggle it? LeftAlt Maybe? Ill might change it later.
Thanks!
Rohwedder
Posts: 7622
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: AHK for Shooter

16 Oct 2021, 02:00

Then,
try:

Code: Select all

Speed = 0.1 ; between zero and infinity, exclusively
LAlt::DragDown := !DragDown ;on/off with LeftAlt
#If DragDown
~*LButton::SetTimer, DragDown,% 10/Speed
~*LButton Up::SetTimer, DragDown, Off
#If
DragDown:
SetMouseDelay, -1
MouseMove, 0,% 1+Speed, 0, R
Return
Yaruqii
Posts: 32
Joined: 11 Jul 2021, 16:29

Re: AHK for Shooter

16 Oct 2021, 02:01

I thank you really much, ill test it later c:
Yaruqii
Posts: 32
Joined: 11 Jul 2021, 16:29

Re: AHK for Shooter

16 Oct 2021, 08:09

@Rohwedder Okay, basicly its working, but when I press LClick the Mouse Drags down, but sometimes, it telepots to an position I were like 1 sec before. Is that fixable?
Rohwedder
Posts: 7622
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: AHK for Shooter

16 Oct 2021, 09:03

It moves the cursor to a position it had 1 second before? This must be WarZone's fault!
The script does not know where the cursor was 1 second ago. The command MouseMove, in relative mode, moves the cursor relatively each time, i.e. the then new position is the old one plus a difference.
Yaruqii
Posts: 32
Joined: 11 Jul 2021, 16:29

Re: AHK for Shooter

16 Oct 2021, 09:22

@Rohwedder
Okay, and is it possibke, to code it working for WarZone? I mean, it works really well but this little error makes it not that useful?
Rohwedder
Posts: 7622
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: AHK for Shooter

16 Oct 2021, 11:22

Maybe WarZone likes mouse_event?

Code: Select all

Speed = 0.1 ; between zero and infinity, exclusively
LAlt::DragDown := !DragDown ;on/off with LeftAlt
#If DragDown
~*LButton::SetTimer, DragDown,% 10/Speed
~*LButton Up::SetTimer, DragDown, Off
#If
DragDown:
DllCall("mouse_event", "UInt", 0x01, "UInt", 0, "UInt", 1+Speed)
Return
Yaruqii
Posts: 32
Joined: 11 Jul 2021, 16:29

Re: AHK for Shooter

16 Oct 2021, 11:46

@Rohwedder Hey, its working perfectly, I really appreciate your work in the Forum. Could you maybe, just if you have time, or if its very easy to you: Could you maybe add a GUI to this Script with following points?
-Button for refreshing the Script
-Text Field to change the Drag down speed
-Text Field to change the toggle key
-Button to deactivate the toggle option

(You can also ignore some points, if they are hard to code or smth, but I would really appreciate it)
Thanks Mate!
Rohwedder
Posts: 7622
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: AHK for Shooter

16 Oct 2021, 13:06

Creating a gui with the mentioned skills is a beginner's exercise. Get a little busy with Autohotkey and you can do it yourself.
Good success!
Yaruqii
Posts: 32
Joined: 11 Jul 2021, 16:29

Re: AHK for Shooter

16 Oct 2021, 13:09

@Rohwedder Sure, ill look into it, Thanks for your Help!
Yaruqii
Posts: 32
Joined: 11 Jul 2021, 16:29

Re: AHK for Shooter

16 Oct 2021, 14:11

@Rohwedder Can I post this script in the working Scripts Topic with Credits to you?
Rohwedder
Posts: 7622
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: AHK for Shooter

17 Oct 2021, 01:48

No problem.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: ReyAHK and 56 guests