ghetek Posted September 21, 2005 Posted September 21, 2005 ive got this. $sssize is just the inetgetsize of the file that is being downloaded. $currentsspercent = @InetGetBytesRead / $sssize I have the $currentsspercent reporting back every 4 seconds in a traytip but i get a number like 0.293423423432. i know i need to strip the string but im drawing a blank as to how to turn that number into a percent. help?
Developers Jos Posted September 21, 2005 Developers Posted September 21, 2005 ive got this. $sssize is just the inetgetsize of the file that is being downloaded.$currentsspercent = @InetGetBytesRead / $sssizeI have the $currentsspercent reporting back every 4 seconds in a traytip but i get a number like 0.293423423432. i know i need to strip the string but im drawing a blank as to how to turn that number into a percent. help? $currentsspercent = @InetGetBytesRead / $sssize * 100 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
ghetek Posted September 21, 2005 Author Posted September 21, 2005 $currentsspercent = @InetGetBytesRead / $sssize * 100ugh... i feel soooo stupid
seandisanti Posted September 21, 2005 Posted September 21, 2005 ugh... i feel soooo stupidActually you may want to go with:$currentsspercent = Round(@InetGetBytesRead / $sssize * 100,0)to kill your decimal, or another number depending on the precision that you want ",2" for accuracy to the hundreths of a percent etc...
Valuater Posted September 21, 2005 Posted September 21, 2005 maybe this could help While @InetGetActive ProgressSet(@InetGetBytesRead / $Size * 100,Round( @InetGetBytesRead / $Size * 100,0) & " %") Sleep(250) Wend 8)
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