Sign in to follow this  
Followers 0
Vindicator

Download Progress

8 posts in this topic

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

Share this post


Link to post
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()

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Works fine for me.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
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

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

[center]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.[/center]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I was using the latest beta, i reinstalled it and it works now... =)

Except now Inetgetsize() always returns 0, even the example ;) (i didnt check before)

Edited by Rad

Share this post


Link to post
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
Sign in to follow this  
Followers 0