Jump to content

inetget etc.


Recommended Posts

Is there a better way to get how much is left than this?

While @InetGetActive
    $size = InetGetSize($url)
    $read = @InetGetBytesRead
    $iPercentage = Round(($size/$read)*100,0)
  TrayTip("Downloading", $iPercentage, 10, 16)
  Sleep(250)
Wend

I found that on the forums but I'm definately not liking how it works. If at all possible I would like to convert to megabytes.

1 megabyte = 1 048 576 bytes

Link to comment
Share on other sites

Would you be looking for something like this?

While @InetGetActive
    $fSize = Round((InetGetSize($url)/1048576),2)
    $fRead = Round((@InetGetBytesRead/1048576),2)
  TrayTip("Downloading", $fRead&" of "&$fSize&"MB", 10, 16)
  Sleep(250)
Wend
Edited by this
UDFsWinSineInOutResize () - Resize a window smoothly based on a sine curve.
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...