I'm trying to write a routine to read a file (text).
I'm using the following routine but the program cannot
escape from the loop... Please help me correct this!!!
Function "FileReader"
FileOpen $0 "File" "r"
loop:
FileRead $0 $1
IfErrors Exit
DetailPrint "$1"
Goto loop:
Exit:
FunctionEnd
Can you find my mistake? Tell me please...
Thx, greetz, Smile2Me.
Help me reading files. PLEASE!!!
3 posts
There seems to be a bug in FileRead and you've found it 🙁
You can get around it though - replace
Dave Laundon.
You can get around it though - replace
withIfErrors Exit
This will not stop on blank lines because they still have \r\n at the end so it should work OK.StrCmp $1 "" Exit
Dave Laundon.
Thx
Dave,
thanks a lot for your help.
I will try it!!!
I hope the bug in FileRead will be fixed in later versions...
Thx, Hendri Adriaens (😁 Smile2Me).
Dave,
thanks a lot for your help.
I will try it!!!
I hope the bug in FileRead will be fixed in later versions...
Thx, Hendri Adriaens (😁 Smile2Me).