Kill Process (Diablo II) while in another Process (PUBG)

Ask gaming related questions (AHK v1.1 and older)
fernsehen123
Posts: 22
Joined: 24 Mar 2018, 13:50

Kill Process (Diablo II) while in another Process (PUBG)

24 Mar 2018, 13:58

hi all,

I have written this script for myself, which is running 24/7 on my PC:

Code: Select all

SetKeyDelay,0
SetBatchlines,-1

Pause::Suspend

#ifWinActive PLAYERUNKNOWN'S BATTLEGROUNDS
+WheelDown::Send {WheelDown}

#ifWinActive PLAYERUNKNOWN'S BATTLEGROUNDS
WheelDown::Send {Numpad0}

#ifWinActive PLAYERUNKNOWN'S BATTLEGROUNDS
+WheelUp::Send {WheelUp}

#ifWinActive PLAYERUNKNOWN'S BATTLEGROUNDS
WheelUp::Send {Numpad1}

#ifWinExist Diablo II
XButton1::WinClose Diablo II

#ifWinExist Diablo II
XButton2::WinClose Diablo II
As you might guess, I play Diablo II in hardcore mode. So whenever something bad happens to me, I press XButtom1/2 :)

you can ignore the PUBG commands... this is all about the 4 lines on the bottom.

It closes Diablo II, if I am
- in Diablo II
- on my Desktop
but not when I am playing PUBG

Any ideas what's wrong here?
If PUBG and Diablo are open and I am in PUBG, the XButtons do not work at all... they just do nothing, and this is sad
Rohwedder
Posts: 7676
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Kill Process (Diablo II) while in another Process (PUBG)

25 Mar 2018, 02:32

Hallo,
only a try (untested):

Code: Select all

SetKeyDelay,0
SetBatchlines,-1
Pause::Suspend
#ifWinActive PLAYERUNKNOWN'S BATTLEGROUNDS
+WheelDown::Send {WheelDown}
WheelDown::Send {Numpad0}
+WheelUp::Send {WheelUp}
WheelUp::Send {Numpad1}
#ifWinExist Diablo II
XButton1::
XButton2::
WinActivate Diablo II
WinClose Diablo II
Return

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], drwill and 51 guests