You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
736 B
Plaintext

URLDownloadToVar(url){
hObject:=ComObjCreate("WinHttp.WinHttpRequest.5.1")
Try, hObject.Open("GET",url)
catch e {
Message = Error Ocurred when trying to do GET Request using URLDownloadToVar to`n: %URL%
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile,ErrorSummaryVar")
}
try {
hObject.Send()
}
catch e {
Message = Error Ocurred when trying to hObject.Send() with URLDownloadToVar Function
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile,ErrorSummaryVar")
; 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.
return ""
}
return hObject.ResponseText
}