IKilledBambi Posted January 20, 2009 Share 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 Link to comment Share on other sites More sharing options...
this Posted January 21, 2009 Share 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. Link to comment Share on other sites More sharing options...
Richard Robertson Posted January 21, 2009 Share 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. Link to comment Share on other sites More sharing options...
IKilledBambi Posted January 21, 2009 Author Share Posted January 21, 2009 I love you! Thanks a bundle! Link to comment Share on other sites More sharing options...
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