Files
posters-shared-functions/URLDownloadToVar.ahk

15 lines
359 B
AutoHotkey
Raw Normal View History

2023-05-28 01:00:44 -04:00
URLDownloadToVar(url){
2023-05-28 01:00:44 -04:00
hObject:=ComObjCreate("WinHttp.WinHttpRequest.5.1")
hObject.Open("GET",url)
2023-10-22 00:28:38 -04:00
try {
hObject.Send()
}
2023-10-22 00:28:38 -04:00
catch e {
; MsgBox, 4096, Error, Failed to connect to:`n`n%url%`n`nAre you connected to the internet? Or is the website down?`n`nDisable Auto Update Check to disable this message.
2023-10-22 00:28:38 -04:00
return ""
}
2023-05-28 01:00:44 -04:00
return hObject.ResponseText
}