Jump to content
Sign in to follow this  

Progress, FileReadLine

Recommended Posts


$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")



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 by Inverted

Share this post

Link to post
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
Sign in to follow this