#SingleInstance, Force Gosub, ReadVariables if !FileExist(vSwitcherDir) { FileCreateDir, %vSwitcherDir%\options } Gui, Color, 303030 Gui, Font, cWhite, MS Sans Serif Gui, Add, Tab3, gMyTabs vMyTabsVar x10 y10 w580 h280, Launch|Paths|Settings Gui, Tab, 1 Gui, Add, Radio, Group Disabled x25 y45 gGOG, GOG Gui, Add, Radio, Disabled x25 y65 gSteam, Steam Gui, Add, Radio, Group Hidden Disabled x230 y45 gDX9, DX9 Gui, Add, Radio, Hidden Disabled x230 y65 gDX11, DX11 Gui, Add, Radio, Group Hidden Disabled x290 y45 gX86, x86 Gui, Add, Radio, Hidden Disabled x290 y65 gX64, x64 Gui, Add, Radio, Group Hidden Disabled x350 y45 gVanilla, Vanilla Gui, Add, Radio, Hidden Disabled x350 y65 gAoM, Ashes of Malmouth Gui, Add, Radio, Hidden Disabled x350 y85 gFG, Forgotten Gods Gui, Add, Checkbox, Hidden Disabled x25 y85 gGI, Grim Internals (x64 Only) Gui, Add, Checkbox, Hidden Disabled x250 y150 w100 h25 0x1000 gLaunchGame, LAUNCH Gui, Tab, 2 if !FileExist(vSteamExe) { Gui, Add, Text, vSteamSetTxt x25 y45 w500 cF9A602, Set your root Steam folder (containing the "steam.exe") here... vVar1 = Set your root Steam folder path here . . . Gui, Add, Edit, x25 y65 w500 h25 R1 ReadOnly Center, %vVar1% Gui, Add, Checkbox, x535 y65 h20 0x1000 gSteamSelect, . . . } else if FileExist(vSteamExe) { Gui, Add, Text, x25 y45 w500 cAqua, The root Steam folder (containing the "steam.exe") has been detected ! Gui, Add, Edit, vSteamSetTxt2 x25 y65 w500 h25 R1 ReadOnly Center, %vSteam% Gui, Add, Checkbox, x535 y65 h20 0x1000 gSteamSelect, . . . } if !FileExist(vGDSteamExe) { Gui, Add, Text, vGDSteamSetTxt x25 y95 w500 cF9A602, Set your Grim Dawn Steam folder (containing the "Grim Dawn.exe") here . . . vVar2 = Set your Grim Dawn Steam folder path here . . . Gui, Add, Edit, vGDSteamSetTxt2 x25 y115 w500 h25 R1 ReadOnly Center, %vVar2% Gui, Add, Checkbox, x535 y115 h20 0x1000 gGDSteamSelect, . . . } else if FileExist(vGDSteamExe) { Gui, Add, Text, vGDSteamSetTxt x25 y95 w500 cAqua, The root GD Steam folder (containing the "Grim Dawn.exe") has been detected ! Gui, Add, Edit, vGDSteamSetTxt2 x25 y115 w500 h25 R1 ReadOnly Center, %vGDSteam% Gui, Add, Checkbox, x535 y115 h20 0x1000 gGDSteamSelect, . . . } if !FileExist(vGDGOGExe) { Gui, Add, Text, vGOGSetTxt x25 y165 w500 cF9A602, Set your Grim Dawn GOG folder (containing the "Grim Dawn.exe") here . . . vVar3 = Set your Grim Dawn GOG folder path here . . . Gui, Add, Edit, vGOGSetTxt2 x25 y185 w500 h25 R1 ReadOnly Center, %vVar3% Gui, Add, Checkbox, x535 y185 h20 0x1000 gGDGOGSelect, . . . } else if FileExist(vGDGOGExe) { Gui, Add, Text, vGOGSetTxt x25 y165 w500 cAqua, The root GD GOG folder (containing the "Grim Dawn.exe") has been detected ! Gui, Add, Edit, vGOGSetTxt2 x25 y185 w500 h25 R1 ReadOnly Center, %vGDGOG% Gui, Add, Checkbox, x535 y185 h20 0x1000 gGDGOGSelect, . . . } Gui, Tab, 3 Gui, Add, Checkbox, x25 y45 w115 h25 0x1000 gDelSaves, Delete Saves Gui, Add, Checkbox, x25 y80 w115 h25 0x1000 gSetWinPos, Set Window Position Gui Show, w600 h300, GD Switcher if FileExist(WinPos) { file := FileOpen(WinPos, "r") X := file.ReadLine() Y := file.ReadLine() file.Close() WinMove, GD Switcher, , %X%, %Y% } ; Check for last tab open and switch to it FileRead, OutputVar, %ReadMyTabs% GuiControl, Choose, MyTabsVar, %OutputVar% Gosub, InitialCheck return MyTabs: GuiControlGet, OutputVar, , MyTabsVar file := FileOpen(ReadMyTabs, "w") file.Write(OutputVar) file.Close() return ReadVariables: vSwitcherDir = %A_MyDocuments%\My Games\switcher WinPos = %vSwitcherDir%\options\WinPos.txt vSteamPathTxt = %vSwitcherDir%\options\SteamPath.txt if FileExist(vSteamPathTxt) { FileRead, vSteam, %vSteamPathTxt% } else if !FileExist(vSteamPathTxt) { vSteam = C:\Program Files (x86)\Steam } vSteamExe = %vSteam%\steam.exe vGDSteamPathTxt = %vSwitcherDir%\options\GDSteamPathTxt.txt if FileExist(vGDSteamPathTxt) { FileRead, vGDSteam, %vGDSteamPathTxt% } else if !FileExist(vGDSteamPathTxt) { vGDSteam = %vSteam%\steamapps\common\Grim Dawn } vGDSteamExe = %vGDSteam%\Grim Dawn.exe vGISteamExe = %vGDSteam%\GrimInternals64.exe vGDGOGPathTxt = %vSwitcherDir%\options\GDGOGPath.txt if FileExist(vGDGOGPathTxt) { FileRead, vGDGOG, %vGDGOGPathTxt% } else if !FileExist(vGDGOGPathTxt) { vGDGOG = C:\Program Files (x86)\GOG Galaxy\Games\Grim Dawn } vGDGOGExe = %vGDGOG%\Grim Dawn.exe vGIGOGExe = %vGDGOG%\GrimInternals64.exe vCreateGDShortcut = %vSwitcherDir%\LaunchGD.lnk vSaveDir = %A_MyDocuments%\My Games\Grim Dawn\save GOG_Active = %vSwitcherDir%\options\GOG_Active.txt Steam_Active = %vSwitcherDir%\options\Steam_Active.txt DX9_GOG_Active = %vSwitcherDir%\options\DX9_GOG_Active.txt DX11_GOG_Active = %vSwitcherDir%\options\DX11_GOG_Active.txt DX9_Steam_Active = %vSwitcherDir%\options\DX9_Steam_Active.txt DX11_Steam_Active = %vSwitcherDir%\options\DX11_Steam_Active.txt X86_GOG_Active = %vSwitcherDir%\options\X86_GOG_Active.txt X64_GOG_Active = %vSwitcherDir%\options\X64_GOG_Active.txt X86_Steam_Active = %vSwitcherDir%\options\X86_Steam_Active.txt X64_Steam_Active = %vSwitcherDir%\options\X64_Steam_Active.txt Vanilla_GOG_Active = %vSwitcherDir%\options\Vanilla_GOG_Active.txt AoM_GOG_Active = %vSwitcherDir%\options\AoM_GOG_Active.txt FG_GOG_Active = %vSwitcherDir%\options\FG_GOG_Active.txt Vanilla_Steam_Active = %vSwitcherDir%\options\Vanilla_Steam_Active.txt AoM_Steam_Active = %vSwitcherDir%\options\AoM_Steam_Active.txt FG_Steam_Active = %vSwitcherDir%\options\FG_Steam_Active.txt GI_GOG_Active = %vSwitcherDir%\options\GI_GOG_Active.txt GI_Steam_Active = %vSwitcherDir%\options\GI_Steam_Active.txt ReadMyTabs = %vSwitcherDir%\options\ReadMyTabs.txt return InitialCheck: ; Reveal controls if FileExist(vGDGOGExe) { GUIControl, Enable, GOG if FileExist(GOG_Active) { GUIControl, Show, DX9 GUIControl, Show, DX11 GUIControl, Enable, DX9 GUIControl, Enable, DX11 } if FileExist(DX9_GOG_Active) or FileExist(DX11_GOG_Active) { GUIControl, Show, x86 GUIControl, Show, x64 GUIControl, Enable, x86 GUIControl, Enable, x64 } if FileExist(X86_GOG_Active) or FileExist(X64_GOG_Active) { GUIControl, Show, Vanilla GUIControl, Show, Ashes of Malmouth GUIControl, Show, Forgotten Gods GUIControl, Enable, Vanilla GUIControl, Enable, Ashes of Malmouth GUIControl, Enable, Forgotten Gods } if FileExist(Vanilla_GOG_Active) or FileExist(AoM_GOG_Active) or FileExist(FG_GOG_Active) { GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, LAUNCH GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, LAUNCH } } if FileExist(vGDSteam) and FileExist(vGDSteamExe) { GUIControl, Enable, Steam if FileExist(Steam_Active) { GUIControl, Show, DX9 GUIControl, Show, DX11 GUIControl, Enable, DX9 GUIControl, Enable, DX11 } if FileExist(DX9_Steam_Active) or FileExist(DX11_Steam_Active) { GUIControl, Show, x86 GUIControl, Show, x64 GUIControl, Enable, x86 GUIControl, Enable, x64 } if FileExist(X86_Steam_Active) or FileExist(X64_Steam_Active) { GUIControl, Show, Vanilla GUIControl, Show, Ashes of Malmouth GUIControl, Show, Forgotten Gods GUIControl, Enable, Vanilla GUIControl, Enable, Ashes of Malmouth GUIControl, Enable, Forgotten Gods } if FileExist(Vanilla_Steam_Active) or FileExist(AoM_Steam_Active) or FileExist(FG_Steam_Active) { GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, LAUNCH GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, LAUNCH } } ; GOG Active ----------------------------- if FileExist(GOG_Active) { GuiControl,, GOG, 1 Gui, Font, cWhite GuiControl, Font, Steam Gui, Font, cF9A602 GuiControl, Font, GOG if FileExist(DX9_GOG_Active) { GuiControl,, DX9, 1 Gui, Font, cWhite GuiControl, Font, DX11 Gui, Font, cF9A602 GuiControl, Font, DX9 } else if FileExist(DX11_GOG_Active) { GuiControl,, DX11, 1 Gui, Font, cWhite GuiControl, Font, DX9 Gui, Font, cF9A602 GuiControl, Font, DX11 } if !FileExist(DX9_GOG_Active) and !FileExist(DX11_GOG_Active) { GuiControl,, DX9, 0 GuiControl,, DX11, 0 Gui, Font, cWhite GuiControl, Font, DX9 Gui, Font, cWhite GuiControl, Font, DX11 } if FileExist(X86_GOG_Active) { GuiControl,, x86, 1 Gui, Font, cWhite GuiControl, Font, x64 Gui, Font, cF9A602 GuiControl, Font, x86 } else if FileExist(X64_GOG_Active) { GuiControl,, x64, 1 Gui, Font, cWhite GuiControl, Font, x86 Gui, Font, cF9A602 GuiControl, Font, x64 } if !FileExist(X86_GOG_Active) and !FileExist(X64_GOG_Active) { GuiControl,, x86, 0 GuiControl,, x64, 0 Gui, Font, cWhite GuiControl, Font, x86 Gui, Font, cWhite GuiControl, Font, x64 } if FileExist(Vanilla_GOG_Active) { GuiControl,, Vanilla, 1 Gui, Font, cWhite GuiControl, Font, Ashes of Malmouth Gui, Font, cWhite GuiControl, Font, Forgotten Gods Gui, Font, cF9A602 GuiControl, Font, Vanilla } else if FileExist(AoM_GOG_Active) { GuiControl,, Ashes of Malmouth, 1 Gui, Font, cWhite GuiControl, Font, Vanilla Gui, Font, cWhite GuiControl, Font, Forgotten Gods Gui, Font, cF9A602 GuiControl, Font, Ashes of Malmouth } else if FileExist(FG_GOG_Active) { GuiControl,, Forgotten Gods, 1 Gui, Font, cWhite GuiControl, Font, Vanilla Gui, Font, cWhite GuiControl, Font, Ashes of Malmouth Gui, Font, cF9A602 GuiControl, Font, Forgotten Gods } if !FileExist(Vanilla_GOG_Active) and !FileExist(AoM_GOG_Active) and !FileExist(FG_GOG_Active) { GuiControl,, Vanilla, 0 GuiControl,, Ashes of Malmouth, 0 GuiControl,, Forgotten Gods, 0 Gui, Font, cWhite GuiControl, Font, Vanilla Gui, Font, cWhite GuiControl, Font, Ashes of Malmouth Gui, Font, cWhite GuiControl, Font, Forgotten Gods } if FileExist(GI_GOG_Active) { GuiControl,, Grim Internals (x64 Only), 1 Gui, Font, cF9A602 GuiControl, Font, Grim Internals (x64 Only) GuiControl, Disable, x86 GuiControl, Disable, x64 } if !FileExist(GI_GOG_Active) { GuiControl,, Grim Internals (x64 Only), 0 Gui, Font, cWhite GuiControl, Font, Grim Internals (x64 Only) } if FileExist(GOG_Active) and !FileExist(vGIGOGExe) { GuiControl, Disable, Grim Internals (x64 Only) } else if FileExist(GOG_Active) and FileExist(vGIGOGExe) { GuiControl, Enable, Grim Internals (x64 Only) } } ; Steam Active ----------------------------- if FileExist(Steam_Active) { GuiControl,, Steam, 1 Gui, Font, cWhite GuiControl, Font, GOG Gui, Font, cF9A602 GuiControl, Font, Steam if FileExist(DX9_Steam_Active) { GuiControl,, DX9, 1 Gui, Font, cWhite GuiControl, Font, DX11 Gui, Font, cF9A602 GuiControl, Font, DX9 } else if FileExist(DX11_Steam_Active) { GuiControl,, DX11, 1 Gui, Font, cWhite GuiControl, Font, DX9 Gui, Font, cF9A602 GuiControl, Font, DX11 } if !FileExist(DX9_Steam_Active) and !FileExist(DX11_Steam_Active) { GuiControl,, DX9, 0 GuiControl,, DX11, 0 Gui, Font, cWhite GuiControl, Font, DX9 Gui, Font, cWhite GuiControl, Font, DX11 } if FileExist(X86_Steam_Active) { GuiControl,, x86, 1 Gui, Font, cWhite GuiControl, Font, x64 Gui, Font, cF9A602 GuiControl, Font, x86 } else if FileExist(X64_Steam_Active) { GuiControl,, x64, 1 Gui, Font, cWhite GuiControl, Font, x86 Gui, Font, cF9A602 GuiControl, Font, x64 } if !FileExist(X86_Steam_Active) and !FileExist(X64_Steam_Active) { GuiControl,, x86, 0 GuiControl,, x64, 0 Gui, Font, cWhite GuiControl, Font, x86 Gui, Font, cWhite GuiControl, Font, x64 } if FileExist(Vanilla_Steam_Active) { GuiControl,, Vanilla, 1 Gui, Font, cWhite GuiControl, Font, Ashes of Malmouth Gui, Font, cWhite GuiControl, Font, Forgotten Gods Gui, Font, cF9A602 GuiControl, Font, Vanilla } else if FileExist(AoM_Steam_Active) { GuiControl,, Ashes of Malmouth, 1 Gui, Font, cWhite GuiControl, Font, Vanilla Gui, Font, cWhite GuiControl, Font, Forgotten Gods Gui, Font, cF9A602 GuiControl, Font, Ashes of Malmouth } else if FileExist(FG_Steam_Active) { GuiControl,, Forgotten Gods, 1 Gui, Font, cWhite GuiControl, Font, Vanilla Gui, Font, cWhite GuiControl, Font, Ashes of Malmouth Gui, Font, cF9A602 GuiControl, Font, Forgotten Gods } if !FileExist(Vanilla_Steam_Active) and !FileExist(AoM_Steam_Active) and !FileExist(FG_Steam_Active) { GuiControl,, Vanilla, 0 GuiControl,, Ashes of Malmouth, 0 GuiControl,, Forgotten Gods, 0 Gui, Font, cWhite GuiControl, Font, Vanilla Gui, Font, cWhite GuiControl, Font, Ashes of Malmouth Gui, Font, cWhite GuiControl, Font, Forgotten Gods } if FileExist(GI_Steam_Active) { GuiControl,, Grim Internals (x64 Only), 1 Gui, Font, cF9A602 GuiControl, Font, Grim Internals (x64 Only) GuiControl, Disable, x86 GuiControl, Disable, x64 } if !FileExist(GI_Steam_Active) { GuiControl,, Grim Internals (x64 Only), 0 Gui, Font, cWhite GuiControl, Font, Grim Internals (x64 Only) } if FileExist(Steam_Active) and !FileExist(vGISteamExe) { GuiControl, Disable, Grim Internals (x64 Only) } else if FileExist(Steam_Active) and FileExist(vGISteamExe) { GuiControl, Enable, Grim Internals (x64 Only) } } return GOG: Process, Exist, Grim Dawn.exe if ErrorLevel = 0 { FileDelete, %Steam_Active% file := FileOpen(GOG_Active, "w") file.Close() Gosub, InitialCheck ; Hide controls if FileExist(vGDGOGExe) { if !FileExist(X86_GOG_Active) and !FileExist(X64_GOG_Active) { GUIControl, Hide, x86 GUIControl, Hide, x64 GUIControl, Disable, x86 GUIControl, Disable, x64 } if !FileExist(Vanilla_GOG_Active) and !FileExist(AoM_GOG_Active) and !FileExist(FG_GOG_Active) { GUIControl, Hide, Vanilla GUIControl, Hide, Ashes of Malmouth GUIControl, Hide, Forgotten Gods GUIControl, Disable, Vanilla GUIControl, Disable, Ashes of Malmouth GUIControl, Disable, Forgotten Gods GUIControl, Hide, Grim Internals (x64 Only) GUIControl, Hide, LAUNCH GUIControl, Disable, Grim Internals (x64 Only) GUIControl, Disable, LAUNCH } } } else { if FileExist(Steam_Active) { GuiControl,, Steam, 1 }} return Steam: Process, Exist, Grim Dawn.exe if ErrorLevel = 0 { FileDelete, %GOG_Active% file := FileOpen(Steam_Active, "w") file.Close() GUIControl, Show, DX9 GUIControl, Show, DX11 GUIControl, Enable, DX9 GUIControl, Enable, DX11 Gosub, InitialCheck ; Hide controls if FileExist(vGDSteam) and FileExist(vGDSteamExe) { if !FileExist(X86_Steam_Active) and !FileExist(X64_Steam_Active) { GUIControl, Hide, x86 GUIControl, Hide, x64 GUIControl, Disable, x86 GUIControl, Disable, x64 } if !FileExist(Vanilla_Steam_Active) and !FileExist(AoM_Steam_Active) and !FileExist(FG_Steam_Active) { GUIControl, Hide, Vanilla GUIControl, Hide, Ashes of Malmouth GUIControl, Hide, Forgotten Gods GUIControl, Disable, Vanilla GUIControl, Disable, Ashes of Malmouth GUIControl, Disable, Forgotten Gods GUIControl, Hide, Grim Internals (x64 Only) GUIControl, Hide, LAUNCH GUIControl, Disable, Grim Internals (x64 Only) GUIControl, Disable, LAUNCH } } } else { if FileExist(GOG_Active) { GuiControl,, GOG, 1 }} return DX9: Process, Exist, Grim Dawn.exe if ErrorLevel = 0 { if FileExist(GOG_Active) { FileDelete, %DX11_GOG_Active% file := FileOpen(DX9_GOG_Active, "w") file.Close() Gui, Font, cWhite GuiControl, Font, DX11 Gui, Font, cF9A602 GuiControl, Font, DX9 GUIControl, Show, x86 GUIControl, Show, x64 GUIControl, Enable, x86 GUIControl, Enable, x64 } else if FileExist(Steam_Active) { FileDelete, %DX11_Steam_Active% file := FileOpen(DX9_Steam_Active, "w") file.Close() Gui, Font, cWhite GuiControl, Font, DX11 Gui, Font, cF9A602 GuiControl, Font, DX9 GUIControl, Show, x86 GUIControl, Show, x64 GUIControl, Enable, x86 GUIControl, Enable, x64 } } else { Gosub, InitialCheck } return DX11: Process, Exist, Grim Dawn.exe if ErrorLevel = 0 { if FileExist(GOG_Active) { FileDelete, %DX9_GOG_Active% file := FileOpen(DX11_GOG_Active, "w") file.Close() Gui, Font, cWhite GuiControl, Font, DX9 Gui, Font, cF9A602 GuiControl, Font, DX11 GUIControl, Show, x86 GUIControl, Show, x64 GUIControl, Enable, x86 GUIControl, Enable, x64 } else if FileExist(Steam_Active) { FileDelete, %DX9_Steam_Active% file := FileOpen(DX11_Steam_Active, "w") file.Close() Gui, Font, cWhite GuiControl, Font, DX9 Gui, Font, cF9A602 GuiControl, Font, DX11 GUIControl, Show, x86 GUIControl, Show, x64 GUIControl, Enable, x86 GUIControl, Enable, x64 } } else { Gosub, InitialCheck } return X86: Process, Exist, Grim Dawn.exe if ErrorLevel = 0 { if FileExist(GOG_Active) { FileDelete, %X64_GOG_Active% file := FileOpen(X86_GOG_Active, "w") file.Close() Gui, Font, cWhite GuiControl, Font, x64 Gui, Font, cF9A602 GuiControl, Font, x86 GUIControl, Show, Vanilla GUIControl, Show, Ashes of Malmouth GUIControl, Show, Forgotten Gods GUIControl, Enable, Vanilla GUIControl, Enable, Ashes of Malmouth GUIControl, Enable, Forgotten Gods } else if FileExist(Steam_Active) { FileDelete, %X64_Steam_Active% file := FileOpen(X86_Steam_Active, "w") file.Close() Gui, Font, cWhite GuiControl, Font, x64 Gui, Font, cF9A602 GuiControl, Font, x86 GUIControl, Show, Vanilla GUIControl, Show, Ashes of Malmouth GUIControl, Show, Forgotten Gods GUIControl, Enable, Vanilla GUIControl, Enable, Ashes of Malmouth GUIControl, Enable, Forgotten Gods } } else { Gosub, InitialCheck } return X64: Process, Exist, Grim Dawn.exe if ErrorLevel = 0 { if FileExist(GOG_Active) { FileDelete, %X86_GOG_Active% file := FileOpen(X64_GOG_Active, "w") file.Close() Gui, Font, cWhite GuiControl, Font, x86 Gui, Font, cF9A602 GuiControl, Font, x64 GUIControl, Show, Vanilla GUIControl, Show, Ashes of Malmouth GUIControl, Show, Forgotten Gods GUIControl, Enable, Vanilla GUIControl, Enable, Ashes of Malmouth GUIControl, Enable, Forgotten Gods } else if FileExist(Steam_Active) { FileDelete, %X86_Steam_Active% file := FileOpen(X64_Steam_Active, "w") file.Close() Gui, Font, cWhite GuiControl, Font, x86 Gui, Font, cF9A602 GuiControl, Font, x64 GUIControl, Show, Vanilla GUIControl, Show, Ashes of Malmouth GUIControl, Show, Forgotten Gods GUIControl, Enable, Vanilla GUIControl, Enable, Ashes of Malmouth GUIControl, Enable, Forgotten Gods } } else { Gosub, InitialCheck } return Vanilla: Process, Exist, Grim Dawn.exe if ErrorLevel = 0 { if FileExist(GOG_Active) { FileDelete, %AoM_GOG_Active% FileDelete, %FG_GOG_Active% file := FileOpen(Vanilla_GOG_Active, "w") file.Close() Gui, Font, cWhite GuiControl, Font, Ashes of Malmouth Gui, Font, cWhite GuiControl, Font, Forgotten Gods Gui, Font, cF9A602 GuiControl, Font, Vanilla GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, LAUNCH GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, LAUNCH } if FileExist(Steam_Active) { FileDelete, %AoM_Steam_Active% FileDelete, %FG_Steam_Active% file := FileOpen(Vanilla_Steam_Active, "w") file.Close() Gui, Font, cWhite GuiControl, Font, Ashes of Malmouth Gui, Font, cWhite GuiControl, Font, Forgotten Gods Gui, Font, cF9A602 GuiControl, Font, Vanilla GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, LAUNCH GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, LAUNCH } } else { Gosub, InitialCheck } return AoM: Process, Exist, Grim Dawn.exe if ErrorLevel = 0 { if FileExist(GOG_Active) { FileDelete, %Vanilla_GOG_Active% FileDelete, %FG_GOG_Active% file := FileOpen(AoM_GOG_Active, "w") file.Close() Gui, Font, cWhite GuiControl, Font, Vanilla Gui, Font, cWhite GuiControl, Font, Forgotten Gods Gui, Font, cF9A602 GuiControl, Font, Ashes of Malmouth GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, LAUNCH GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, LAUNCH } if FileExist(Steam_Active) { FileDelete, %Vanilla_Steam_Active% FileDelete, %FG_Steam_Active% file := FileOpen(AoM_Steam_Active, "w") file.Close() Gui, Font, cWhite GuiControl, Font, Vanilla Gui, Font, cWhite GuiControl, Font, Forgotten Gods Gui, Font, cF9A602 GuiControl, Font, Ashes of Malmouth GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, LAUNCH GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, LAUNCH } } else { Gosub, InitialCheck } return FG: Process, Exist, Grim Dawn.exe if ErrorLevel = 0 { if FileExist(GOG_Active) { FileDelete, %Vanilla_GOG_Active% FileDelete, %AoM_GOG_Active% file := FileOpen(FG_GOG_Active, "w") file.Close() Gui, Font, cWhite GuiControl, Font, Vanilla Gui, Font, cWhite GuiControl, Font, Ashes of Malmouth Gui, Font, cF9A602 GuiControl, Font, Forgotten Gods GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, LAUNCH GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, LAUNCH } if FileExist(Steam_Active) { FileDelete, %Vanilla_Steam_Active% FileDelete, %AoM_Steam_Active% file := FileOpen(FG_Steam_Active, "w") file.Close() Gui, Font, cWhite GuiControl, Font, Vanilla Gui, Font, cWhite GuiControl, Font, Ashes of Malmouth Gui, Font, cF9A602 GuiControl, Font, Forgotten Gods GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, LAUNCH GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, LAUNCH } } else { Gosub, InitialCheck } return GI: Process, Exist, Grim Dawn.exe if ErrorLevel = 0 { GuiControlGet, OutputVar, , Grim Internals (x64 Only) if OutputVar = 1 { if FileExist(GOG_Active) { file := FileOpen(GI_GOG_Active, "w") file.Close() Gui, Font, cF9A602 GuiControl, Font, Grim Internals (x64 Only) GuiControl, Disable, x86 GuiControl, Disable, x64 } else if FileExist(Steam_Active) { file := FileOpen(GI_Steam_Active, "w") file.Close() Gui, Font, cF9A602 GuiControl, Font, Grim Internals (x64 Only) GuiControl, Disable, x86 GuiControl, Disable, x64 } } if OutputVar = 0 { if FileExist(GOG_Active) { FileDelete, %GI_GOG_Active% Gui, Font, cWhite GuiControl, Font, Grim Internals (x64 Only) GuiControl, Enable, x86 GuiControl, Enable, x64 } else if FileExist(Steam_Active) { FileDelete, %GI_Steam_Active% Gui, Font, cWhite GuiControl, Font, Grim Internals (x64 Only) GuiControl, Enable, x86 GuiControl, Enable, x64 } } } else { Gosub, InitialCheck } return LaunchGame: Process, Exist, Grim Dawn.exe if ErrorLevel = 0 { Sleep, 125 Control, UnCheck, , LAUNCH if FileExist(GI_GOG_Active) and FileExist(GOG_Active) { if FileExist(DX9_Steam_Active) { if FileExist(Vanilla_Steam_Active) { FileCreateShortcut, %vGIGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /d3d9 /nogdx1 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(AoM_Steam_Active) { FileCreateShortcut, %vGIGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /d3d9 /nogdx2 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(FG_Steam_Active) { FileCreateShortcut, %vGIGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /d3d9 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } } else if FileExist(DX11_Steam_Active) { if FileExist(Vanilla_Steam_Active) { FileCreateShortcut, %vGIGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /nogdx1 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(AoM_Steam_Active) { FileCreateShortcut, %vGIGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /nogdx2 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(FG_Steam_Active) { FileCreateShortcut, %vGIGOGExe%, %vCreateGDShortcut%, %vGDGOG% Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } } } else if FileExist(GI_Steam_Active) and FileExist(Steam_Active) { if FileExist(DX9_Steam_Active) { if FileExist(Vanilla_Steam_Active) { FileCreateShortcut, %vGISteamExe%, %vCreateGDShortcut%, %vGDSteam%, /d3d9 /nogdx1 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(AoM_Steam_Active) { FileCreateShortcut, %vGISteamExe%, %vCreateGDShortcut%, %vGDSteam%, /d3d9 /nogdx2 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(FG_Steam_Active) { FileCreateShortcut, %vGISteamExe%, %vCreateGDShortcut%, %vGDSteam%, /d3d9 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } } else if FileExist(DX11_Steam_Active) { if FileExist(Vanilla_Steam_Active) { FileCreateShortcut, %vGISteamExe%, %vCreateGDShortcut%, %vGDSteam%, /nogdx1 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(AoM_Steam_Active) { FileCreateShortcut, %vGISteamExe%, %vCreateGDShortcut%, %vGDSteam%, /nogdx2 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(FG_Steam_Active) { FileCreateShortcut, %vGISteamExe%, %vCreateGDShortcut%, %vGDSteam% Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } } } else if FileExist(GOG_Active) { if FileExist(DX9_GOG_Active) { if FileExist(X86_GOG_Active) { if FileExist(Vanilla_GOG_Active) { FileCreateShortcut, %vGDGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /d3d9 /nogdx1 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(AoM_GOG_Active) { FileCreateShortcut, %vGDGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /d3d9 /nogdx2 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(FG_GOG_Active) { FileCreateShortcut, %vGDGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /d3d9 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } } else if FileExist(X64_GOG_Active) { if FileExist(Vanilla_GOG_Active) { FileCreateShortcut, %vGDGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /d3d9 /x64 /nogdx1 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(AoM_GOG_Active) { FileCreateShortcut, %vGDGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /d3d9 /x64 /nogdx2 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(FG_GOG_Active) { FileCreateShortcut, %vGDGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /d3d9 /x64 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } } } else if FileExist(DX11_GOG_Active) { if FileExist(X86_GOG_Active) { if FileExist(Vanilla_GOG_Active) { FileCreateShortcut, %vGDGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /nogdx1 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(AoM_GOG_Active) { FileCreateShortcut, %vGDGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /nogdx2 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(FG_GOG_Active) { FileCreateShortcut, %vGDGOGExe%, %vCreateGDShortcut%, %vGDGOG%, -applaunch 219990 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } } else if FileExist(X64_GOG_Active) { if FileExist(Vanilla_GOG_Active) { FileCreateShortcut, %vGDGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /x64 /nogdx1 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(AoM_GOG_Active) { FileCreateShortcut, %vGDGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /x64 /nogdx2 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(FG_GOG_Active) { FileCreateShortcut, %vGDGOGExe%, %vCreateGDShortcut%, %vGDGOG%, /x64 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } } } } else if FileExist(Steam_Active) { if FileExist(DX9_Steam_Active) { if FileExist(X86_Steam_Active) { if FileExist(Vanilla_Steam_Active) { FileCreateShortcut, %vSteamExe%, %vCreateGDShortcut%, %vSteam%, -applaunch 219990 /d3d9 /nogdx1 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(AoM_Steam_Active) { FileCreateShortcut, %vSteamExe%, %vCreateGDShortcut%, %vSteam%, -applaunch 219990 /d3d9 /nogdx2 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(FG_Steam_Active) { FileCreateShortcut, %vSteamExe%, %vCreateGDShortcut%, %vSteam%, -applaunch 219990 /d3d9 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } } else if FileExist(X64_Steam_Active) { if FileExist(Vanilla_Steam_Active) { FileCreateShortcut, %vSteamExe%, %vCreateGDShortcut%, %vSteam%, -applaunch 219990 /d3d9 /x64 /nogdx1 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(AoM_Steam_Active) { FileCreateShortcut, %vSteamExe%, %vCreateGDShortcut%, %vSteam%, -applaunch 219990 /d3d9 /x64 /nogdx2 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(FG_Steam_Active) { FileCreateShortcut, %vSteamExe%, %vCreateGDShortcut%, %vSteam%, -applaunch 219990 /d3d9 /x64 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } } } else if FileExist(DX11_Steam_Active) { if FileExist(X86_Steam_Active) { if FileExist(Vanilla_Steam_Active) { FileCreateShortcut, %vSteamExe%, %vCreateGDShortcut%, %vSteam%, -applaunch 219990 /nogdx1 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(AoM_Steam_Active) { FileCreateShortcut, %vSteamExe%, %vCreateGDShortcut%, %vSteam%, -applaunch 219990 /nogdx2 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(FG_Steam_Active) { FileCreateShortcut, %vSteamExe%, %vCreateGDShortcut%, %vSteam%, -applaunch 219990 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } } else if FileExist(X64_Steam_Active) { if FileExist(Vanilla_Steam_Active) { FileCreateShortcut, %vSteamExe%, %vCreateGDShortcut%, %vSteam%, -applaunch 219990 /x64 /nogdx1 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(AoM_Steam_Active) { FileCreateShortcut, %vSteamExe%, %vCreateGDShortcut%, %vSteam%, -applaunch 219990 /x64 /nogdx2 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } else if FileExist(FG_Steam_Active) { FileCreateShortcut, %vSteamExe%, %vCreateGDShortcut%, %vSteam%, -applaunch 219990 /x64 Run %vCreateGDShortcut% FileDelete, %vCreateGDShortcut% } } } } } else { Sleep, 3000 Control, UnCheck, , LAUNCH } return SteamSelect: Sleep, 125 Control, UnCheck, , Button12 FileSelectFolder, OutputVar, , , Select the root Steam folder that contains the "steam.exe" file... if OutputVar = { ; ... } else { OutputVar2 = %OutputVar%\steam.exe if FileExist(OutputVar2) { file := FileOpen(vSteamPathTxt, "w") file.Write(OutputVar) file.Close() Gui, Font, cAqua GuiControl, Font, SteamSetTxt GuiControl, Text, SteamSetTxt, The root Steam folder (containing the "steam.exe") has been detected ! GuiControl, , SteamSetTxt2, %OutputVar% Gosub, ReadVariables Gosub, InitialCheck } } return GDSteamSelect: Sleep, 125 Control, UnCheck, , Button13 FileSelectFolder, OutputVar, , , Select the Grim Dawn Steam folder that contains the "Grim Dawn.exe" file... if OutputVar = { ; ... } else { OutputVar2 = %OutputVar%\Grim Dawn.exe if FileExist(OutputVar2) { file := FileOpen(vGDSteamPathTxt, "w") file.Write(OutputVar) file.Close() Gui, Font, cAqua GuiControl, Font, GDSteamSetTxt GuiControl, Text, GDSteamSetTxt, The root GD Steam folder (containing the "Grim Dawn.exe") has been detected ! GuiControl, , GDSteamSetTxt2, %OutputVar% Gosub, ReadVariables Gosub, InitialCheck } } return GDGOGSelect: Sleep, 125 Control, UnCheck, , Button14 FileSelectFolder, OutputVar, , , Select the Grim Dawn GOG folder that contains the "Grim Dawn.exe" file... if OutputVar = { ; ... } else { OutputVar2 = %OutputVar%\Grim Dawn.exe if FileExist(OutputVar2) { file := FileOpen(vGDGOGPathTxt, "w") file.Write(OutputVar) file.Close() Gui, Font, cAqua GuiControl, Font, GOGSetTxt GuiControl, Text, GOGSetTxt, The root GD GOG folder (containing the "Grim Dawn.exe") has been detected ! GuiControl, , GOGSetTxt2, %OutputVar% Gosub, ReadVariables Gosub, InitialCheck } } return SetWinPos: Sleep, 125 Control, UnCheck, , Set Window Position WinGetPos, X, Y, , , A file := FileOpen(WinPos, "w") file.Write(X) file.Write("`n"Y) file.Close() return DelSaves: Sleep, 125 Control, UnCheck, , Delete Saves WinGetPos, X, Y, , , A X := X + 0 Y := Y + 335 FileRecycle, %vSaveDir% if ErrorLevel = 1 { SplashTextOn, 600, 100, Saves NOT Deleted, `nThe following folder location does NOT exist:`n`n%vSaveDir% WinMove, Saves NOT Deleted, , %X%, %Y% Sleep, 10000 SplashTextOff } else { SplashTextOn, 600, 100, Saves Deleted, `nThe following folder location was sent to the Recycling Bin:`n`n%vSaveDir% WinMove, Saves Deleted, , %X%, %Y% Sleep, 10000 SplashTextOff } return ^!r:: Reload GuiClose: ExitApp