From 3cafc2600435b55fb2d34cb74bbaf64c56479af3 Mon Sep 17 00:00:00 2001 From: Zjamnik Date: Mon, 12 Feb 2024 18:34:12 +0100 Subject: [PATCH] launch game option --- stratagems.ahk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/stratagems.ahk b/stratagems.ahk index 31058ba..f88fda3 100644 --- a/stratagems.ahk +++ b/stratagems.ahk @@ -2,6 +2,14 @@ SendMode "Event" SetKeyDelay 100, 50 +if ( not WinExist("ahk_exe helldivers2.exe")) { + runResult := MsgBox("Do you want to start the game?", "Run Helldivers 2?", "292 T10") + + if (runResult = "yes") { + Run("steam://rungameid/553850") + } +} + sendStratagem(keyname) { BlockInput "On" Send "{LControl down}" . getStratagem(getValue("HOTKEYS", keyname)) . "{LControl up}" @@ -70,7 +78,7 @@ sendStratagem(keyname) { loop parse, IniRead(configPath, "HOTKEYS"), "`n" { hotkeyPair := StrSplit(A_LoopField, "=") - HotIfWinactive("HELLDIVERS™ 2") + HotIfWinactive("ahk_exe helldivers2.exe") Hotkey(hotkeyPair[1], sendStratagem) }