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

FileReadLine() syntax question

$
0
0
Hi, I am using the FileReadLine() function to proceed through the dates of a calendar and then using the FileReadLine function to view tomorrow's schedule simultaneously.

The code shows tomorrow's schedule perfectly but then causes the FileReadLine() function to skip a line.

For example, in the code and test.txt file below it will skip from 11/01/2012 to 11/03/2012

Would someone be so kind as to show me how should the code be written differently so that it works as intended without skipping a line?

11/01/2012,mary
11/02/2012,sue
11/03/2012,jane
11/04/2012,bob


$file = FileOpen("test.txt", 0)
$linenumber = 0
While 1
$line = FileReadLine($file)
If @error = -1 Then ExitLoop
$linenumber += 1
MsgBox(0, "", $line & @CRLF & FileReadLine($file,$linenumber+1))
Wend
FileClose($file)


Viewing all articles
Browse latest Browse all 12506

Trending Articles



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