I have downstripped my script to these few lines. It turns out that StringReplace sets an error level - in contrast to what I read in the documention.
Have I mis-interpreted the doc?
Code: Select all
Loop, READ, %fileName%, %outFile%
{
thisLine := A_LoopReadLine
MsgBox 1 ErrorLevel = %ErrorLevel% ; => 0
StringReplace, thisLine, thisLine, -, |, all
MsgBox 2 ErrorLevel = %ErrorLevel% ; => 1
}
As a solution I now set Errorlevel to 0 just after StringReplace ... but this should IMHO not be necessary.
Do You spot an error there?