While does not have a next but a loop so this:

Quote:


While @Error = 0
Writeline (2,$R+@crlf)
Readline(1)
Next





Should be changed to:

Quote:


While @Error = 0
Writeline (2,$R+@crlf)
Readline(1)
Loop





Look at the bold parts.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.