Running two macros in parallel

Ask gaming related questions
WB6rAnnNsbGwNFAziX
Posts: 1
Joined: 03 Sep 2019, 06:22

Running two macros in parallel

03 Sep 2019, 06:32

Hi,

I'm playing Diablo III and the button mashing is really hard on my fingers. So I wanted to macro two things. The issue i'm having is, that I don't know how I can run two macros, from the same key with different timings.

So what I need is: press "a" every ~550ms and press left click every ~25ms while holding down Mouse4

For now I have this:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


Random, 550ms, 500, 600   ;Define random function "550ms" for archon blast
Random, 25ms, 20, 30        ;Define random function "25ms" for archon punch

Xbutton2::
    While, GetKeyState("XButton2","P")
    {
        Loop, 50
        {
            Click
            Sleep, %25ms%
        }
        Send, a
    }
Return
Now this isn't really reliable. I don't know why but sometimes it just doesn't work (does nothing at all) sometimes only the loop works, sometimes only the "send, a" works.

Is there a possibility that I can run these in parallel? Like:

Hold Mouse4
-> separate loop with click and 25ms sleep
-> separate loop with send a and 550ms sleep

both are running at the same time and independant from each other?

Thanks a lot!

Return to “Gaming”

Who is online

Users browsing this forum: KixenDK and 33 guests