TheTex Posted January 10, 2009 Share Posted January 10, 2009 I am using FileReadLine to loop through reading a different line every couple seconds or so. the problem is there are thousands of lines in the text document so every time it opens it to read the file it has a long "lag" delay that slows the program down tremendously. What I am asking is if there is a way to just keep the file open then keep reading it through every loop. Link to comment Share on other sites More sharing options...
evilertoaster Posted January 10, 2009 Share Posted January 10, 2009 FileOpen() ? Link to comment Share on other sites More sharing options...
Developers Jos Posted January 10, 2009 Developers Share Posted January 10, 2009 Put the records in an Array and use the Array entries. Jos 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. Link to comment Share on other sites More sharing options...
herewasplato Posted January 12, 2009 Share Posted January 12, 2009 I am using FileReadLine to loop through reading a different line every couple seconds or so. ...The help files warns about this:From a performance standpoint it is a bad idea to read line by line specifying "line" parameter whose value is incrementing by one. This forces AutoIt to reread the file from the beginning until it reach the specified line.... a way to just keep the file open then keep reading it through every loop.Like others have mentioned FileOpen or maybe _FileReadToArray. If the info in the file being read changes, you will have to reread it into the array each time. [size="1"][font="Arial"].[u].[/u][/font][/size] 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