Jump to content

Problem with InetGet() function


Recommended Posts

Hi all.

Sorry for my bad english, I'am french.

I have a problem with the function InetGet(), the file is downloaded, but to 99%, the download stops and only after many seconds the file is completly downloaded.

As if InetGet() block, and then resumed later. I don't know if it comes from me or it is a bug. Can you help me ?

Here's the code:

$File="http://www.autoitscript.com/autoit3/files/beta/autoit/autoit-v3.2.10.0-rc-setup.exe"
$size = InetGetSize($File)

ProgressOn ( "Downloading " & $File, "0% downloaded" , $size & " bytes remaining" )

InetGet($File,@DesktopDir & "\autoit-v3.2.10.0-rc-setup.exe",1,1)

While @InetGetActive
    $Percent=Int((@InetGetBytesRead*100)/$size)
    $Remain=$size-@InetGetBytesRead
    ProgressSet( $Percent,$Remain & " bytes remaining", $Percent & "% downloaded")
    Sleep(100)
WEnd

ProgressOff()

MsgBox(0,"Download complete",@DesktopDir & "\autoit-v3.2.10.0-rc-setup.exe")
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...