DCCD Posted June 7, 2009 Share Posted June 7, 2009 I'm trying to insert a progress bar, Any suggestions? $F = FileOpen("1gb.txt", 0) While 1 $line = FileReadLine($F) If @error = -1 Then ExitLoop TrayTip("line", $line, 5, 1) Wend FileClose($F) [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
Inverted Posted June 7, 2009 Share Posted June 7, 2009 (edited) $F = FileOpen("1gb.txt", 0) $total = FileGetSize("1gb.txt") $count = 0 While 1 $line = FileReadLine($F) If @error = -1 Then ExitLoop $count = $count + StringLen($line) ToolTip(Round(($count/$total)*100) & " % complete") Wend FileClose($F) TrayTip is SSSLLLOOOWWWW What do you think of my first attempt ? (I just tested on a 650kb file, hehe, a lot of overhead to calculate the percentage and string length for each line) EDIT: I'm doing timed tests and the tooltip+Round line is also waaaayyyy too slow ... I hope the update of the progress bar element will be quicker than Tooltip Edited June 7, 2009 by Inverted Link to comment Share on other sites More sharing options...
DCCD Posted June 7, 2009 Author Share Posted June 7, 2009 First, thank you SO MUCHThis is just an exampleTrayTip is SSSLLLOOOWWWWthanks again... [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group 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