Downloads a file from the internet using the http or ftp protocol.
InetGet ( "URL", "filename" [, reload [, background]] )
Parameters
URL | URL of the file to download. See remarks below. |
filename | Local filename to download to. |
reload | [optional] 0 = (default) Get the file from local cache if available 1 = Forces a reload from the remote site |
background | [optional] 0 = (default) Wait until the download is complete before continuing. 1 = return immediately and download in the background (see remarks). |
Return Value
Success: | Returns 1. |
Failure: | Returns 0. |
Remarks
Internet Explorer 3 or greater must be installed for this function to work.InetGet("abort")
Related
FtpBinaryMode (Option), FtpSetProxy, InetGetSize, HttpSetProxy
Example
InetGet("http://www.mozilla.org", "C:\foo.html")
InetGet("http://www.autoitscript.com", "C:\mydownload.htm", 1)
InetGet("ftp://ftp.mozilla.org/pub/mozilla.org/README", "README.txt", 1)
; Advanced example - downloading in the background
InetGet("http://www.nowhere.com/somelargefile.exe", "test.exe", 1, 1)
While @InetGetActive
TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16)
Sleep(250)
Wend
MsgBox(0, "Bytes read", @InetGetBytesRead)