Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Know when last line of file is reached

$
0
0
Hi Guys

I am currently trying to use data from a text file, currently I have a counter to increment to the next line when I call it next

$zap = FileReadLine($datafile, $linecounter)

I know its best NOT to increment this way BUT I am calling line 1, using the data then calling line 2 using the data etc etc

Each file is different in length so I can't stop it as I don't know when the counter grabs the last line.

So, my question is, how do I know when it's at the last line so I can stop the program? I've tried @error = -1 but as I am not within a loop until I get the end of the file, I just call each line when I need it, any ideas?

Many thanks as always

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>