#SingleInstance Force #NoTrayIcon ;------------------------------------------------------------------------------------------------------ Gosub, ReadVariables if !FileExist(vSwitcherDir) { FileCreateDir, %vSwitcherDir%\options } ;------------------------------------------------------------------------------------------------------ ;------------------------------ Start GUI ;------------------------------------------------------------------------------------------------------ Gui, Color, 3C3C3C Gui, Font, s10 Gui, Add, Radio, Group Disabled gGOGLabel x105 y315 w295 h30 +0x9000, GOG Gui, Add, Radio, Disabled gSteamLabel x405 y315 w295 h30 +0x9000, Steam ;------------------------------ Sidebar ;------------------------------------------------------------------------------------------------------ Gui, Add, Tab3, x-50 y-50 w150 h450, Sidebar ;------------------------------------------------------------------------------------------------------ Gui, Tab, 1 ;----------------------------------------------------------- Gui, Add, Radio, Group gLaunchLabel x5 y5 w88 h30 +0x9000, Launch Gui, Add, Radio, gPathsLabel x5 y40 w88 h30 +0x9000, Paths Gui, Add, Radio, gSettingsLabel x5 y75 w88 h30 +0x9000, Settings Gui, Add, Text, vGroupSpacer2Var x5 y110 w88 h235 0x1012 Gui, Add, Checkbox, Hidden Disabled x5 y315 w88 h30 +0x9000 gPlayLabel, PLAY ;------------------------------ MainTabs ;------------------------------------------------------------------------------------------------------ Gui, Add, Tab3, gMainTabs vMainTabsVar x98 y-50 w650 h360, Launch|Paths|Settings ;------------------------------------------------------------------------------------------------------ Gui, Tab, 1 ;------------------ Launch Tab ;----------------------------------------------------------- If FileExist(GOG_Active) ;----------------------------------------------------------- { ;----------------------------------------------------------- Gui, Add, Text, Hidden Disabled vGroupSpacer1Var x260 y5 w441 h298 0x1012 Gui, Add, Checkbox, Hidden Disabled cWhite x420 y15 gGI, Grim Internals (x64 Only) ;----------------------------------------------------------- Gui, Add, Radio, Group Hidden Disabled x105 y5 w150 h30 +0x9000 gFG, Forgotten Gods Gui, Add, Radio, Hidden Disabled xp yp+35 wp hp +0x9000 gAoM, Ashes of Malmouth Gui, Add, Radio, Hidden Disabled xp yp+35 wp hp +0x9000 gVanilla, Vanilla Gui, Add, Text, Hidden Disabled vSpacer2Var xp yp+35 wp h24 0x1012 ;----------------------------------------------------------- Gui, Add, Radio, Group Hidden Disabled xp yp+29 wp h30 +0x9000 gX64, x64 Gui, Add, Radio, Hidden Disabled xp yp+35 wp hp +0x9000 gX86, x86 Gui, Add, Text, Hidden Disabled vSpacer1Var xp yp+35 wp h24 0x1012 ;----------------------------------------------------------- Gui, Add, Radio, Group Hidden Disabled xp yp+29 wp h30 +0x9000 gDX11, DX11 Gui, Add, Radio, Hidden Disabled xp yp+35 wp hp +0x9000 gDX9, DX9 ;----------------------------------------------------------- } Else If FileExist(Steam_Active) { ;----------------------------------------------------------- Gui, Add, Text, Hidden Disabled vGroupSpacer1Var x105 y5 w440 h298 0x1012 Gui, Add, Checkbox, Hidden Disabled cWhite x250 y15 gGI, Grim Internals (x64 Only) ;----------------------------------------------------------- Gui, Add, Radio, Group Hidden Disabled x550 y5 w150 h30 +0x9000 gFG, Forgotten Gods Gui, Add, Radio, Hidden Disabled xp yp+35 wp hp +0x9000 gAoM, Ashes of Malmouth Gui, Add, Radio, Hidden Disabled xp yp+35 wp hp +0x9000 gVanilla, Vanilla Gui, Add, Text, Hidden Disabled vSpacer2Var xp yp+35 wp h24 0x1012 ;----------------------------------------------------------- Gui, Add, Radio, Group Hidden Disabled xp yp+29 wp h30 +0x9000 gX64, x64 Gui, Add, Radio, Hidden Disabled xp yp+35 wp hp +0x9000 gX86, x86 Gui, Add, Text, Hidden Disabled vSpacer1Var xp yp+35 wp h24 0x1012 ;----------------------------------------------------------- Gui, Add, Radio, Group Hidden Disabled xp yp+29 wp h30 +0x9000 gDX11, DX11 Gui, Add, Radio, Hidden Disabled xp yp+35 wp hp +0x9000 gDX9, DX9 ;----------------------------------------------------------- } Else { ;----------------------------------------------------------- Gui, Add, Text, Hidden Disabled vGroupSpacer1Var x0 y0 w441 h298 0x1012 Gui, Add, Checkbox, Hidden Disabled cWhite x0 y0 gGI, Grim Internals (x64 Only) ;----------------------------------------------------------- Gui, Add, Radio, Group Hidden Disabled x0 y0 w150 h30 +0x9000 gFG, Forgotten Gods Gui, Add, Radio, Hidden Disabled xp yp wp hp +0x9000 gAoM, Ashes of Malmouth Gui, Add, Radio, Hidden Disabled xp yp wp hp +0x9000 gVanilla, Vanilla Gui, Add, Text, Hidden Disabled vSpacer2Var xp yp wp h24 0x1012 ;----------------------------------------------------------- Gui, Add, Radio, Group Hidden Disabled xp yp wp h30 +0x9000 gX64, x64 Gui, Add, Radio, Hidden Disabled xp yp wp hp +0x9000 gX86, x86 Gui, Add, Text, Hidden Disabled vSpacer1Var xp yp+35 wp h24 0x1012 ;----------------------------------------------------------- Gui, Add, Radio, Group Hidden Disabled xp yp wp h30 +0x9000 gDX11, DX11 Gui, Add, Radio, Hidden Disabled xp yp wp hp +0x9000 gDX9, DX9 ;----------------------------------------------------------- } Gui, Tab, 2 ;------------------ Paths Tab ;----------------------------------------------------------- if !FileExist(vGDGOGExe) ;----------------------------------------------------------- { ;----------------------------------------------------------- Gui, Add, Text, vGOGSetTxt x135 y10 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 cWhite x135 y30 w500 h25 R1 ReadOnly Center, %vVar3% Gui, Add, Checkbox, x645 y32 h20 0x1000 gGDGOGSelect, . . . ;----------------------------------------------------------- } else if FileExist(vGDGOGExe) { ;----------------------------------------------------------- Gui, Add, Text, vGOGSetTxt x135 y10 w500 cAqua, The root GD GOG folder (containing the "Grim Dawn.exe") has been detected ! Gui, Add, Edit, vGOGSetTxt2 cWhite x135 y30 w500 h25 R1 ReadOnly Center, %vGDGOG% Gui, Add, Checkbox, x645 y32 h20 0x1000 gGDGOGSelect, . . . ;----------------------------------------------------------- } ;----------------------------------------------------------- if !FileExist(vSteamExe) ;----------------------------------------------------------- { ;----------------------------------------------------------- Gui, Add, Text, vSteamSetTxt x135 y85 w500 cF9A602, Set your root Steam folder (containing the "steam.exe") here... vVar1 = Set your root Steam folder path here . . . Gui, Add, Edit, cWhite x135 y105 w500 h25 R1 ReadOnly Center, %vVar1% Gui, Add, Checkbox, x645 y107 h20 0x1000 gSteamSelect, . . . ;----------------------------------------------------------- } else if FileExist(vSteamExe) { ;----------------------------------------------------------- Gui, Add, Text, vSteamSetTxt x135 y85 w500 cAqua, The root Steam folder (containing the "steam.exe") has been detected ! Gui, Add, Edit, cWhite vSteamSetTxt2 x135 y105 w500 h25 R1 ReadOnly Center, %vSteam% Gui, Add, Checkbox, x645 y107 h20 0x1000 gSteamSelect, . . . ;----------------------------------------------------------- } ;----------------------------------------------------------- if !FileExist(vGDSteamExe) ;----------------------------------------------------------- { ;----------------------------------------------------------- Gui, Add, Text, vGDSteamSetTxt x135 y135 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, cWhite vGDSteamSetTxt2 x135 y155 w500 h25 R1 ReadOnly Center, %vVar2% Gui, Add, Checkbox, x645 y157 h20 0x1000 gGDSteamSelect, . . . ;----------------------------------------------------------- } else if FileExist(vGDSteamExe) { ;----------------------------------------------------------- Gui, Add, Text, vGDSteamSetTxt x135 y135 w500 cAqua, The root GD Steam folder (containing the "Grim Dawn.exe") has been detected ! Gui, Add, Edit, cWhite vGDSteamSetTxt2 x135 y155 w500 h25 R1 ReadOnly Center, %vGDSteam% Gui, Add, Checkbox, x645 y157 h20 0x1000 gGDSteamSelect, . . . ;----------------------------------------------------------- } ;------------------------------------------------------------------------------------------------------ Gui, Tab, 3 ;------------------ Settings Tab ;----------------------------------------------------------- Gui, Add, Checkbox, x115 y45 w135 h25 0x1000 gDelSaves, Delete Saves Gui, Add, Checkbox, x115 y80 w135 h25 0x1000 gSetWinPos, Set Window Position ;------------------------------------------------------------------------------------------------------ ;------------------------------ Show GUI Gui Show, w705 h350, 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, MainTabsVar, %OutputVar% If OutputVar = Launch { GuiControl, , Launch, 1 } Else If OutputVar = Paths { GuiControl, , Paths, 1 } Else If OutputVar = Settings { GuiControl, , Settings, 1 } Else { GuiControl, , Launch, 1 } Gosub, InitialCheck ;----------------------------------------------------------- Return ;------------------------------------------------------------------------------------------------------ ;------------------------------ End GUI ;------------------------------ Labels ;------------------------------------------------------------------------------------------------------ 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, Spacer1Var GUIControl, Show, x86 GUIControl, Show, x64 GUIControl, Enable, x86 GUIControl, Enable, x64 } if FileExist(X86_GOG_Active) or FileExist(X64_GOG_Active) { GUIControl, Show, Spacer2Var 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, GroupSpacer1Var GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, PLAY GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, PLAY } } 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, Spacer1Var GUIControl, Show, x86 GUIControl, Show, x64 GUIControl, Enable, x86 GUIControl, Enable, x64 } if FileExist(X86_Steam_Active) or FileExist(X64_Steam_Active) { GUIControl, Show, Spacer2Var 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, GroupSpacer1Var GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, PLAY GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, PLAY } } ; GOG Active ----------------------------- if FileExist(GOG_Active) { GuiControl,, GOG, 1 if FileExist(DX9_GOG_Active) { GUIControl, Show, Spacer1Var GuiControl,, DX9, 1 } else if FileExist(DX11_GOG_Active) { GUIControl, Show, Spacer1Var GuiControl,, DX11, 1 } if !FileExist(DX9_GOG_Active) and !FileExist(DX11_GOG_Active) { GuiControl,, DX9, 0 GuiControl,, DX11, 0 } if FileExist(X86_GOG_Active) { GUIControl, Show, Spacer2Var GuiControl,, x86, 1 } else if FileExist(X64_GOG_Active) { GUIControl, Show, Spacer2Var GuiControl,, x64, 1 } if !FileExist(X86_GOG_Active) and !FileExist(X64_GOG_Active) { GuiControl,, x86, 0 GuiControl,, x64, 0 } if FileExist(Vanilla_GOG_Active) { GuiControl,, Vanilla, 1 } else if FileExist(AoM_GOG_Active) { GuiControl,, Ashes of Malmouth, 1 } else if FileExist(FG_GOG_Active) { GuiControl,, Forgotten Gods, 1 } 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 } if FileExist(GI_GOG_Active) { GuiControl,, Grim Internals (x64 Only), 1 Gui, Font, cF9A602 GuiControl, Font, Grim Internals (x64 Only) GuiControl,, x86, 0 GuiControl,, x64, 0 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) } ; Hide controls if FileExist(vGDGOGExe) { if !FileExist(X86_GOG_Active) and !FileExist(X64_GOG_Active) { GUIControl, Hide, Spacer2Var 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, GroupSpacer1Var GUIControl, Hide, Spacer1Var GUIControl, Hide, Spacer2Var GUIControl, Hide, Grim Internals (x64 Only) GUIControl, Hide, PLAY GUIControl, Disable, Grim Internals (x64 Only) GUIControl, Disable, PLAY } } if FileExist(GOG_Active) and FileExist(DX9_GOG_Active) or FileExist(DX11_GOG_Active) { GUIControl, Show, Spacer1Var GUIControl, Show, x86 GUIControl, Show, x64 GUIControl, Enable, x86 GUIControl, Enable, x64 if FileExist(X86_GOG_Active) or FileExist(X64_GOG_Active) { GUIControl, Show, Spacer2Var 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) { VarH := 200 GuiControl, Move, GroupSpacer2Var, % "h" VarH GuiControl, MoveDraw, GroupSpacer2Var GUIControl, Show, GroupSpacer1Var GUIControl, Show, PLAY GUIControl, Show, Grim Internals (x64 Only) GUIControl, Enable, PLAY GUIControl, Enable, Grim Internals (x64 Only) if FileExist(GI_GOG_Active) { GUIControl, Disable, x86 GUIControl, Disable, x64 } } } } } ; Steam Active ----------------------------- if FileExist(Steam_Active) { GuiControl,, Steam, 1 if FileExist(DX9_Steam_Active) { GUIControl, Show, Spacer1Var GuiControl,, DX9, 1 } else if FileExist(DX11_Steam_Active) { GUIControl, Show, Spacer1Var GuiControl,, DX11, 1 } if !FileExist(DX9_Steam_Active) and !FileExist(DX11_Steam_Active) { GuiControl,, DX9, 0 GuiControl,, DX11, 0 } if FileExist(X86_Steam_Active) { GUIControl, Show, Spacer2Var GuiControl,, x86, 1 } else if FileExist(X64_Steam_Active) { GUIControl, Show, Spacer2Var GuiControl,, x64, 1 } if !FileExist(X86_Steam_Active) and !FileExist(X64_Steam_Active) { GuiControl,, x86, 0 GuiControl,, x64, 0 } if FileExist(Vanilla_Steam_Active) { GuiControl,, Vanilla, 1 } else if FileExist(AoM_Steam_Active) { GuiControl,, Ashes of Malmouth, 1 } else if FileExist(FG_Steam_Active) { GuiControl,, Forgotten Gods, 1 } 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 } if FileExist(GI_Steam_Active) { GuiControl,, Grim Internals (x64 Only), 1 Gui, Font, cF9A602 GuiControl, Font, Grim Internals (x64 Only) GuiControl,, x86, 0 GuiControl,, x64, 0 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) } ; 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, GroupSpacer1Var GUIControl, Hide, Spacer1Var GUIControl, Hide, Spacer2Var GUIControl, Hide, Grim Internals (x64 Only) GUIControl, Hide, PLAY GUIControl, Disable, Grim Internals (x64 Only) GUIControl, Disable, PLAY } } if FileExist(Steam_Active) and FileExist(DX9_Steam_Active) or FileExist(DX11_Steam_Active) { GUIControl, Show, Spacer1Var GUIControl, Show, x86 GUIControl, Show, x64 GUIControl, Enable, x86 GUIControl, Enable, x64 if FileExist(X86_Steam_Active) or FileExist(X64_Steam_Active) { GUIControl, Show, Spacer2Var 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) { VarH := 200 GuiControl, Move, GroupSpacer2Var, % "h" VarH GuiControl, MoveDraw, GroupSpacer2Var GUIControl, Show, GroupSpacer1Var GUIControl, Show, PLAY GUIControl, Show, Grim Internals (x64 Only) GUIControl, Enable, PLAY GUIControl, Enable, Grim Internals (x64 Only) if FileExist(GI_Steam_Active) { GUIControl, Disable, x86 GUIControl, Disable, x64 } } } } } return ;------------------------------------------------------------------------------------------------------ MainTabs: ;----------------------------------------------------------- GuiControlGet, OutputVar, , MainTabsVar file := FileOpen(ReadMyTabs, "w") file.Write(OutputVar) file.Close() Return ;------------------------------------------------------------------------------------------------------ GOGLabel: ;------------------------------------------------------------------------------------------------------ Process, Exist, Grim Dawn.exe ;----------------------------------------------------------- if ErrorLevel = 0 ;----------------------------------------------------------- { ;----------------------------------------------------------- ControlSwitchXYW("GroupSpacer1Var", 260, 5, 441) ControlSwitchXY("Grim Internals (x64 Only)", 420, 15) ControlSwitchXY("Forgotten Gods", 105, 5) ControlSwitchXY("Ashes of Malmouth", 105, 40) ControlSwitchXY("Vanilla", 105, 75) ControlSwitchXY("Spacer2Var", 105, 110) ;----------------------------------------------------------- ControlSwitchXY("x64", 105, 139) ControlSwitchXY("x86", 105, 174) ControlSwitchXY("Spacer1Var", 105, 209) ;----------------------------------------------------------- ControlSwitchXY("DX11", 105, 238) ControlSwitchXY("DX9", 105, 273) ;----------------------------------------------------------- FileDelete, %Steam_Active% file := FileOpen(GOG_Active, "w") file.Close() ;----------------------------------------------------------- ; 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 VarH := 235 GuiControl, Move, GroupSpacer2Var, % "h" VarH GuiControl, MoveDraw, GroupSpacer2Var GUIControl, Hide, GroupSpacer1Var GUIControl, Hide, Spacer1Var GUIControl, Hide, Spacer2Var GUIControl, Hide, Grim Internals (x64 Only) GUIControl, Hide, PLAY GUIControl, Disable, Grim Internals (x64 Only) GUIControl, Disable, PLAY } } Gosub, InitialCheck } else { ;----------------------------------------------------------- if FileExist(Steam_Active) ;----------------------------------------------------------- { ;----------------------------------------------------------- GuiControl, , Steam, 1 ;----------------------------------------------------------- } } Return ;------------------------------------------------------------------------------------------------------ SteamLabel: ;------------------------------------------------------------------------------------------------------ Process, Exist, Grim Dawn.exe ;----------------------------------------------------------- if ErrorLevel = 0 ;----------------------------------------------------------- { ;----------------------------------------------------------- ControlSwitchXYW("GroupSpacer1Var", 105, 5, 440) ControlSwitchXY("Grim Internals (x64 Only)", 250, 15) ControlSwitchXY("Forgotten Gods", 550, 5) ControlSwitchXY("Ashes of Malmouth", 550, 40) ControlSwitchXY("Vanilla", 550, 75) ControlSwitchXY("Spacer2Var", 550, 110) ;----------------------------------------------------------- ControlSwitchXY("x64", 550, 139) ControlSwitchXY("x86", 550, 174) ControlSwitchXY("Spacer1Var", 550, 209) ;----------------------------------------------------------- ControlSwitchXY("DX11", 550, 238) ControlSwitchXY("DX9", 550, 273) ;----------------------------------------------------------- FileDelete, %GOG_Active% file := FileOpen(Steam_Active, "w") file.Close() ;----------------------------------------------------------- ; 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 VarH := 235 GuiControl, Move, GroupSpacer2Var, % "h" VarH GuiControl, MoveDraw, GroupSpacer2Var GUIControl, Hide, GroupSpacer1Var GUIControl, Hide, Spacer1Var GUIControl, Hide, Spacer2Var GUIControl, Hide, Grim Internals (x64 Only) GUIControl, Hide, PLAY GUIControl, Disable, Grim Internals (x64 Only) GUIControl, Disable, PLAY } } Gosub, InitialCheck } 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() GUIControl, Show, Spacer1Var 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() GUIControl, Show, Spacer1Var 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() GUIControl, Show, Spacer1Var 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() GUIControl, Show, Spacer1Var 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() GUIControl, Show, Spacer2Var 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() GUIControl, Show, Spacer2Var 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() GUIControl, Show, Spacer2Var 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() GUIControl, Show, Spacer2Var 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() VarH := 200 GuiControl, Move, GroupSpacer2Var, % "h" VarH GuiControl, MoveDraw, GroupSpacer2Var GUIControl, Show, GroupSpacer1Var GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, PLAY GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, PLAY } if FileExist(Steam_Active) { FileDelete, %AoM_Steam_Active% FileDelete, %FG_Steam_Active% file := FileOpen(Vanilla_Steam_Active, "w") file.Close() VarH := 200 GuiControl, Move, GroupSpacer2Var, % "h" VarH GuiControl, MoveDraw, GroupSpacer2Var GUIControl, Show, GroupSpacer1Var GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, PLAY GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, PLAY } } 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() VarH := 200 GuiControl, Move, GroupSpacer2Var, % "h" VarH GuiControl, MoveDraw, GroupSpacer2Var GUIControl, Show, GroupSpacer1Var GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, PLAY GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, PLAY } if FileExist(Steam_Active) { FileDelete, %Vanilla_Steam_Active% FileDelete, %FG_Steam_Active% file := FileOpen(AoM_Steam_Active, "w") file.Close() VarH := 200 GuiControl, Move, GroupSpacer2Var, % "h" VarH GuiControl, MoveDraw, GroupSpacer2Var GUIControl, Show, GroupSpacer1Var GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, PLAY GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, PLAY } } 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() VarH := 200 GuiControl, Move, GroupSpacer2Var, % "h" VarH GuiControl, MoveDraw, GroupSpacer2Var GUIControl, Show, GroupSpacer1Var GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, PLAY GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, PLAY } if FileExist(Steam_Active) { FileDelete, %Vanilla_Steam_Active% FileDelete, %AoM_Steam_Active% file := FileOpen(FG_Steam_Active, "w") file.Close() VarH := 200 GuiControl, Move, GroupSpacer2Var, % "h" VarH GuiControl, MoveDraw, GroupSpacer2Var GUIControl, Show, GroupSpacer1Var GUIControl, Show, Grim Internals (x64 Only) GUIControl, Show, PLAY GUIControl, Enable, Grim Internals (x64 Only) GUIControl, Enable, PLAY } } 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,, x86, 0 GuiControl,, x64, 0 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,, x86, 0 GuiControl,, x64, 0 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 Gosub, InitialCheck } else if FileExist(Steam_Active) { FileDelete, %GI_Steam_Active% Gui, Font, cWhite GuiControl, Font, Grim Internals (x64 Only) GuiControl, Enable, x86 GuiControl, Enable, x64 Gosub, InitialCheck } } } else { Gosub, InitialCheck } Return ;------------------------------------------------------------------------------------------------------ LaunchLabel: ;------------------------------------------------------------------------------------------------------ GuiControl, , Launch, 1 GuiControl, Choose, MainTabsVar, 1 RefreshMainTabButtons() Gosub, MainTabs Return ;------------------------------------------------------------------------------------------------------ PathsLabel: ;------------------------------------------------------------------------------------------------------ GuiControl, , Paths, 1 GuiControl, Choose, MainTabsVar, 2 RefreshMainTabButtons() Gosub, MainTabs Return ;------------------------------------------------------------------------------------------------------ SettingsLabel: ;------------------------------------------------------------------------------------------------------ GuiControl, , Settings, 1 GuiControl, Choose, MainTabsVar, 3 RefreshMainTabButtons() Gosub, MainTabs Return ;------------------------------------------------------------------------------------------------------ PlayLabel: ;----------------------------------------------------------- Process, Exist, Grim Dawn.exe if ErrorLevel = 0 { Sleep, 500 GuiControl,, PLAY, 0 Sleep, 500 GuiControl,, PLAY, 1 Sleep, 500 GuiControl,, PLAY, 0 Sleep, 500 GuiControl,, PLAY, 1 Sleep, 500 GuiControl,, PLAY, 0 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 { GuiControl,, PLAY, 0 } Return ;------------------------------------------------------------------------------------------------------ SteamSelect: ;------------------------------------------------------------------------------------------------------ Sleep, 125 Control, UnCheck, , Button12 FileSelectFolder, OutputVar, , , Select the root Steam folder that contains the "steam.exe" file... ;----------------------------------------------------------- if OutputVar = ;----------------------------------------------------------- { ;----------------------------------------------------------- ; ... do nothing ;----------------------------------------------------------- } 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 = ;----------------------------------------------------------- { ;----------------------------------------------------------- ; ... do nothing ;----------------------------------------------------------- } 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 = { ; ... do nothing } 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 ;------------------------------------------------------------------------------------------------------ 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 ;------------------------------------------------------------------------------------------------------ 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 ;------------------------------------------------------------------------------------------------------ ;------------------------------ Functions ;------------------------------------------------------------------------------------------------------ ;------------------------------------------------------------------------------------------------------ ControlSwitchXY(Name, VarX, VarY) ;----------------------------------------------------------- { GuiControl, Move, %Name%, % "x" VarX-100 "y" VarY+25 GuiControl, MoveDraw, %Name% } Return ;----------------------------------------------------------- ;------------------------------------------------------------------------------------------------------ ControlSwitchXYW(Name, VarX, VarY, VarW) ;----------------------------------------------------------- { GuiControl, Move, %Name%, % "x" VarX-100 "y" VarY+25 "w" VarW GuiControl, MoveDraw, %Name% } Return ;----------------------------------------------------------- ;------------------------------------------------------------------------------------------------------ RefreshMainTabButtons() ;----------------------------------------------------------- { GuiControl, MoveDraw, Launch GuiControl, MoveDraw, Paths GuiControl, MoveDraw, Settings } Return ;----------------------------------------------------------- ;------------------------------------------------------------------------------------------------------ ;------------------------------ Hotkeys ;------------------------------------------------------------------------------------------------------ ;------------------------------------------------------------------------------------------------------ ^!r:: ;----------------------------------------------------------- Reload Return ;----------------------------------------------------------- ;------------------------------------------------------------------------------------------------------ GuiClose: ;----------------------------------------------------------- ExitApp Return ;----------------------------------------------------------- ;------------------------------------------------------------------------------------------------------