Is it possible to assign 4 functions to a button?

Ask gaming related questions (AHK v1.1 and older)
zerox
Posts: 77
Joined: 15 Apr 2021, 13:01

Is it possible to assign 4 functions to a button?

Post by zerox » 20 Jun 2021, 07:21

Hello guys!

I have good mouse macro for a game, and i want to share with my friend, but he havent gamer mouse, so he cant create macro.
It's a bit complicated, so i upload 2 imgae to show it better.
I want this command while i hold "Q" key: "Send Esc, 0,001ms delay" --> "Send E, 0,05 ms delay" --> "Send 5, 0,05ms delay" --> "Send left click down, 0,05ms delay, Send left click up"--> repeat this: https://ibb.co/6Jc3SB7

Or if it's not possible, we can run it with auto E spammer, so 2 script will work together. In this case: Q" key: "Send Esc, 0,001ms delay" --> "Send 5, 0,05ms delay" --> "Send left click down, 0,05ms delay, Send left click up"--> repeat this: https://ibb.co/rGWjzC8

I tried to give the best explanation, hope its clear. I know it's long, and complicated, so i will really appreciate any help :bravo:

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

Re: Is it possible to assign 4 functions to a button?

Post by mikeyww » 20 Jun 2021, 07:34

The sleep is not precise; small Sleep like this cannot typically be achieved with this method. Documentation shows an alternative, but I do not know whether it works for such tiny sleep values or whether you could even achieve that.

Code: Select all

q::
While GetKeyState("q", "P") {
 Send {Esc}
 Sleep, 1
 Send e
 Sleep, 1
 Send 5
 Sleep, 1
 Click, D
 Sleep, 1
 Click, U
}
Return
SendInput, SetKeyDelay, or SetMouseDelay may help you a bit with some granularity.

Rohwedder
Posts: 7509
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Is it possible to assign 4 functions to a button?

Post by Rohwedder » 20 Jun 2021, 09:13

Hallo,
I want this command while i hold "Q" key: "Send Esc, 0,001ms delay"
0.001ms = 1µs? Sorry, that sounds like bullshit!
Even if a macro could do this why would anyone program a game that reacts that fast?

Post Reply

Return to “Gaming Help (v1)”