$file = FileOpen("test.txt", 0)
; Check if file opened for reading OK
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
; Read in lines of text until the EOF is reached
$i=1
While 1
If $i Then
$line = FileReadLine($file,$i)
If @error = -1 Then
ExitLoop
EndIf
MsgBox(0, "Line read:", $line)
Else
$line = FileReadLine($file,$i) ;au3里怎么没找到移动读写位置的函数?,这里读一行可以把读写位置移动下来
If @error = -1 Then
ExitLoop
EndIf
EndIf
$i=$i+2;如此修改,已经解决
Wend
FileClose($file)
[ 本帖最后由 fanchenglu 于 2009-1-9 01:06 编辑 ] |