Total new - need help (diablo 4)

Ask gaming related questions
Blomm123
Posts: 1
Joined: 07 Dec 2023, 05:06

Total new - need help (diablo 4)

Post by Blomm123 » 07 Dec 2023, 05:11

Hi!
I have no idea how to make a macro. Is it possible to get some help and make a script that spam key ”1”, ”4” and ”right click” every 0.1 second?


[Mod action: Moved topic to the “Gaming” section.]

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

Re: Total new - need help (diablo 4)

Post by mikeyww » 07 Dec 2023, 09:10

Welcome to this AutoHotkey forum!

Code: Select all

#Requires AutoHotkey v2.0

F3:: {
 Static on := False
 If on := !on
      SetTimer(spam, 100), spam(), SoundBeep(1500)
 Else SetTimer(spam, 0), SoundBeep(1000)
}

spam() {
 SetKeyDelay 25, 25
 SendEvent '14{RButton}'
}

OuroborosGhost
Posts: 3
Joined: 20 Jan 2024, 08:09
Contact:

Re: Total new - need help (diablo 4)

Post by OuroborosGhost » 20 Jan 2024, 08:24

Code: Select all

#Requires AutoHotkey v2.0
Persistent
HotIfWinActive "ahk_class Diablo IV Main Window Class"
#SingleInstance Force

SetTimer spam, 100

spam() {
  If GetKeyState("RButton", "P") {
    While GetKeyState("RButton", "P") {
        Sendinput "14{RButton}"
        }

    Return
  }
  }
;checks if Right mouse button is Physically held down. i find diablo 4 ui tends to interupt macros so its better to make 
;macro hit a couple extra keys saving work by increasing number of keys  macro presses 
;theres better ways (i started learning a couple days ago) but this simple setup ive had the most success
;if u need something explained or questions dont hesitate

;IMPORTANT
;convert to exe and run as admin
[Mod edit: Fixed codebox. Codebox tags (and also Code tags) should go around the code.]

Post Reply

Return to “Gaming”