From 8a823e763c383ac9df79b0d8cc9e9d98951b039d Mon Sep 17 00:00:00 2001 From: Zjamnik Date: Fri, 16 Feb 2024 19:57:44 +0100 Subject: [PATCH] win active detection fix --- stratagems.ahk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stratagems.ahk b/stratagems.ahk index 897e866..aebfea2 100644 --- a/stratagems.ahk +++ b/stratagems.ahk @@ -2,7 +2,7 @@ SendMode "Event" SetKeyDelay 100, 50 -if ( not WinExist("ahk_exe helldivers2.exe")) { +if ( not WinExist("HELLDIVERS™ 2")) { runResult := MsgBox("Do you want to start the game?", "Run Helldivers 2?", "292 T10") if (runResult = "yes") { @@ -19,7 +19,7 @@ sendStratagem(keyname) { ; Loadout recorder global recording := false -HotIfWinactive("ahk_exe helldivers2.exe") +HotIfWinactive("HELLDIVERS™ 2") Hotkey("~Space", recorderHotkey, "Off") Hotkey("~w", recorderHotkey, "Off") Hotkey("~s", recorderHotkey, "Off") @@ -31,7 +31,7 @@ recorderHotkey(keypressed) { global loadoutSequence .= keypressed = "~Space" ? "x" : StrSplit(keypressed, "~")[2] } -#HotIf WinActive("ahk_exe helldivers2.exe") +#HotIf WinActive("HELLDIVERS™ 2") !]:: { if (recording) { Hotkey("~Space", , "Off") @@ -173,7 +173,7 @@ changeLoadout(offset) { loop parse, IniRead(configPath, "HOTKEYS"), "`n" { hotkeyPair := StrSplit(A_LoopField, "=") - HotIfWinactive("ahk_exe helldivers2.exe") + HotIfWinactive("HELLDIVERS™ 2") Hotkey(hotkeyPair[1], sendStratagem) }