I've tried below two methods, both not working:
Code: Select all
x := ComObjCreate("WinHTTP.WinHTTPrequest.5.1") ComObjConnect(x, "http_")
Code: Select all
x := ComObjCreate("WinHTTP.WinHTTPrequest.5.1") x.OnResponseFinished := Func("Finished")
Code: Select all
#Persistent
#Include, WinHttpRequest.ahk ; https://github.com/infogulch/WinHttpRequest
url := "http://ahkscript.org/boards/"
x := new WinHttpRequest({ OnResponseFinished: Func("Finished"), OnResponseDataAvailable: Func("Downloading") })
x.Open("GET", url, true)
x.Send()
Return
Downloading(id) {
static n := 0
; How to display the progress?
ToolTip, % ++n
}
Finished(id) {
msgbox Finished!
}
@lexikos: It would be nice if ComObjConnect support "WinHTTP.WinHTTPrequest.5.1".