Diablo 4 Logout Macro

Ask gaming related questions (AHK v1.1 and older)
DIablo4PLAYER
Posts: 1
Joined: 31 May 2023, 12:35

Diablo 4 Logout Macro

Post by DIablo4PLAYER » 31 May 2023, 12:36

Hello Everyone!

I'm trying to make a logout macro but i'm confused on how it works. Will this script work ?
---------

Code: Select all

; Close Diablo 4 AutoHotkey Script
; Press Ctrl + Alt + D to close Diablo 4 

^!d:: ; Ctrol + Alt + D Hotkey

; Get list of running processes
Process, Exist, Diablo4.exe

; Check if Diablo4.exe is running
If (ErrorLevel)
{
	; Close Diablo4.exe
	Process, Close, Diablo4.exe
	MsgBox, 64, Diablo 4 Closed, Diablo 4 has been successfully closed.
}
else
{
	MsgBox, 48, Diablo 4 Not Running, Diablo 4 is not currently running.
}
Return
[Mod edit: [code][/code] tags added.]
----------

Hard to test without the game being available lool

[Mod edit: Moved topic to AHK v1 help. The main forums are for v2 topics now.]

Return to “Gaming Help (v1)”