I need expert's help about making this small and particular script for game

Ask gaming related questions (AHK v1.1 and older)
Pacifista
Posts: 46
Joined: 17 Jan 2022, 16:17

I need expert's help about making this small and particular script for game

Post by Pacifista » 17 Jan 2022, 16:27

Hello guys, i need to make a script like this.

When i click left it has to keep stroking a key like f or q in every second or in an adjustable interval.

It has to start at the moment when i press the left click and should work every time and will let go once i release the left click.

Tthe situation is, i'll fire the bullets and it will keep pressing f and also won't interrupt left click. Even if the ability goes to cooldown it'll press to f as long as i keep pressing click and shooting.

To be honest i wanted to write this by myself but no matter where i go i just couldnt find the whole example in a place and i dont know how to combine many stuff or what is the best way to write this script.

thanks yall even if you dont help me.

User avatar
mikeyww
Posts: 26596
Joined: 09 Sep 2014, 18:38

Re: I need expert's help about making this small and particular script for game

Post by mikeyww » 17 Jan 2022, 18:57

Code: Select all

~LButton::
Gosub, Key
SetTimer, Key, 1000
SoundBeep, 1500
KeyWait, LButton
SetTimer, Key, Off
SoundBeep, 1000
Return
Key:
Send f
Return
image220117-1856-001_cr.png
Key history
image220117-1856-001_cr.png (15.97 KiB) Viewed 358 times

Pacifista
Posts: 46
Joined: 17 Jan 2022, 16:17

Re: I need expert's help about making this small and particular script for game

Post by Pacifista » 18 Jan 2022, 12:57

mikeyww wrote:
17 Jan 2022, 18:57

Code: Select all

~LButton::
Gosub, Key
SetTimer, Key, 1000
SoundBeep, 1500
KeyWait, LButton
SetTimer, Key, Off
SoundBeep, 1000
Return
Key:
Send f
Return

image220117-1856-001_cr.png
Sir, this was a masterpiece, i salute you.

Post Reply

Return to “Gaming Help (v1)”