Jump to content

Download Progress


Recommended Posts

Ok, I'm making a script that will download the things I dowbload constantly, and I want to have a progress bar that tells me the progress of it,

Say Im using:

InetGet("url")

How would I be doing this?

If I hadn't said thank you yet, and you deserve it, than thank you...

Link to comment
Share on other sites

Something like this?...

Dim $size = InetGetSize("http://www.yourfilehere.com/file/file.au3")

ProgressOn("Downloading...", "Retrieving new version.")
     While @InetGetActive
          Dim $p = (100 * @InetGetBytesRead) / $size
          ProgressSet($p, @InetGetBytesRead & "/" & $size & " bytes", "Download in progress.")
          Sleep(250)
     WEnd
ProgressOff()
Link to comment
Share on other sites

Something like this?...

Dim $size = InetGetSize("http://www.yourfilehere.com/file/file.au3")

ProgressOn("Downloading...", "Retrieving new version.")
     While @InetGetActive
          Dim $p = (100 * @InetGetBytesRead) / $size
          ProgressSet($p, @InetGetBytesRead & "/" & $size & " bytes", "Download in progress.")
          Sleep(250)
     WEnd
ProgressOff()
oÝ÷ Ûú®¢×~׫"w­ëR7­êÞÉ¢²È§«­¢+Ù%¹ÑÐ ÅÕ½Ðí¡ÑÑÀè¼½ÝÝܹå½ÕÉ¥±¡É¹½´½¥±½¥±¹ÔÌÅÕ½Ðì°ÅÕ½Ðí¥±¹ÔÌÅÕ½Ðì°Ä°Ä

As I said it's in helpfile axample.

Link to comment
Share on other sites

Um yea I tried this the other day and it didnt work, and it still doesnt work even with your example(s)

InetGet("http://www.eve-files.com/media/12/eve_chart-rmr.jpg", "eve_chart-rmr.jpg", 1, 1)

While @InetGetActive
  TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16)
  Sleep(250)
Wend

MsgBox(0, "Bytes read", @InetGetBytesRead)

I tried with an EXE as well, it just returns -1 and i have no idea why

Link to comment
Share on other sites

  • Moderators

Um yea I tried this the other day and it didnt work, and it still doesnt work even with your example(s)

InetGet("http://www.eve-files.com/media/12/eve_chart-rmr.jpg", "eve_chart-rmr.jpg", 1, 1)

While @InetGetActive
  TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16)
  Sleep(250)
Wend

MsgBox(0, "Bytes read", @InetGetBytesRead)

I tried with an EXE as well, it just returns -1 and i have no idea why

What version of AutoIt are you using? Could be the wininet.dll issue others were having when they changed the structure.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...