diff --git a/Chrome-Functions.ahk b/Chrome-Functions.ahk index 16bc0c1..dfd599f 100644 --- a/Chrome-Functions.ahk +++ b/Chrome-Functions.ahk @@ -37,7 +37,7 @@ DownloadLatestChromium(){ ChromeDriverDownloadFilepath = %ParentFolder%\chromedriver-win64 ChromeDriverTemporaryExeFilepath = %ParentFolder%\chromedriver-win64\chromedriver-win64\chromedriver.exe ChromeDownloadZipFilepath = %ParentFolder%\chrome-win64.zip - ChromeDownloadFilepath = C:\Users\%A_Username%\Syncthing\Git\Freedomain-Video-Uploader\Lib\chrome-win64 + ChromeDownloadFilepath = %A_ScriptDir%\Lib\chrome-win64 ChromeDriverMoverEXEFilepath = %A_ScriptDir%\Lib\Chromedriver-Mover.exe ChromeDriverMoverURL = https://git.freedomainplaylists.com/yuriy/Chromedriver-Mover/releases/download/1.0/Chromedriver-Mover.exe diff --git a/URLDownloadToVar.ahk b/URLDownloadToVar.ahk index 3871921..1e93648 100644 --- a/URLDownloadToVar.ahk +++ b/URLDownloadToVar.ahk @@ -1,6 +1,12 @@ URLDownloadToVar(url){ hObject:=ComObjCreate("WinHttp.WinHttpRequest.5.1") hObject.Open("GET",url) - hObject.Send() + + try hObject.Send() + catch e { + return "" + ; msgbox, failed! + } + return hObject.ResponseText } \ No newline at end of file