IKilledBambi Posted January 20, 2009 Posted January 20, 2009 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
this Posted January 21, 2009 Posted January 21, 2009 (edited) 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 January 21, 2009 by this UDFsWinSineInOutResize () - Resize a window smoothly based on a sine curve.
Richard Robertson Posted January 21, 2009 Posted January 21, 2009 $fSize = Round(InetGetSize($url)/1048576,2) While @InetGetActive $fRead = Round((@InetGetBytesRead/1048576),2) TrayTip("Downloading", $fRead&" of "&$fSize&"MB", 10, 16) Sleep(250) Wend Polling the server every loop is a waste of bandwidth.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now