diff --git a/Chrome-Functions.ahk b/Chrome-Functions.ahk index 5b1c26e..6e4f340 100644 --- a/Chrome-Functions.ahk +++ b/Chrome-Functions.ahk @@ -23,20 +23,23 @@ GetChromeFilepath(){ ; ChromeFilepath is global variable ; Establish Variable with Filepath to be used throughout the script - ChromePortableFilepath = %A_ScriptDir%\Lib\chrome-win64\chrome.exe + if(ChromeFilepath = ""){ - if(FileExist(ChromePortableFilepath)){ - ChromeFilepath := ChromePortableFilepath + ChromePortableFilepath = %A_ScriptDir%\Lib\chrome-win64\chrome.exe - Message = Using Chromium Portable for Upload - SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") - } - else { - if(FileExist("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")) - ChromeFilepath = C:\Program Files (x86)\Google\Chrome\Application\chrome.exe + if(FileExist(ChromePortableFilepath)){ + ChromeFilepath := ChromePortableFilepath - if(FileExist("C:\Program Files\Google\Chrome\Application\chrome.exe")) - ChromeFilepath = C:\Program Files\Google\Chrome\Application\chrome.exe + Message = Using Chromium Portable for Upload + SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") + } + else { + if(FileExist("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")) + ChromeFilepath = C:\Program Files (x86)\Google\Chrome\Application\chrome.exe + + if(FileExist("C:\Program Files\Google\Chrome\Application\chrome.exe")) + ChromeFilepath = C:\Program Files\Google\Chrome\Application\chrome.exe + } } }