I have this command but want to enhance it.

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

I have this command but want to enhance it.

Post by Pacifista » 06 Jul 2023, 15:06

Code: Select all

~LButton::
Gosub, Key
SetTimer, Key, 4000
KeyWait, LButton
SetTimer, Key, Off
Return
Key:
Send f
Return
this code is working great yet it has a missing function.

Image

this script has been written by the Dumbledore of the ahk "mikeyww"
can a pro help me? thx in advance.


[Mod edit: Added [code][/code] tags. Please remember to use them yourself when posting code!]

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

Re: I have this command but want to enhance it.

Post by mikeyww » 06 Jul 2023, 19:25

Code: Select all

#Requires AutoHotkey v1.1.33
freq := 4000

~LButton::
If (A_TickCount > end) {
 go := True
 Gosub Key
 SoundBeep 1500
} Else {
 go := False
 SoundBeep 1000
}
KeyWait LButton
Return

Key:
Send f
end := A_TickCount + freq
SetTimer Key, % go & GetKeyState("LButton", "P") ? -freq : "Off"
Return

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

Re: I have this command but want to enhance it.

Post by Pacifista » 07 Jul 2023, 09:17

Ufff, sir this is working amazing but sometimes it wont activate due to depleted booster points.

Can you add something to this script?

Sometimes i have to activate " f " button by myself and if i press " f " button manually can this action reset the script's " f " button counter to zero?

plus it looks like script wont track lmb and wont activate time to time.
Last edited by Pacifista on 07 Jul 2023, 09:24, edited 1 time in total.

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

Re: I have this command but want to enhance it.

Post by mikeyww » 07 Jul 2023, 09:21

The script does not have an F counter.

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

Re: I have this command but want to enhance it.

Post by Pacifista » 07 Jul 2023, 09:33

Ok, thank you so much but when i use this, i mean press and hold lmb it triggers but during that 4 sec interval when i press lmb twice and hold it wont read my lmb it seems.

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

Re: I have this command but want to enhance it.

Post by mikeyww » 07 Jul 2023, 09:38

Your diagram indicates to overlook the click until 4 seconds after the last F.

You have the tools here to make the script do what you want. Change the commands, the order, etc. Adjust as you wish!

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

Re: I have this command but want to enhance it.

Post by Pacifista » 07 Jul 2023, 09:49

Thx mr mikey.

Post Reply

Return to “Gaming Help (v1)”