FileRead Error 1591
Keywords: FileRead Error 1591
Question:
The following code produce the message:1591: FileRead: Line too Longwith the following file:File = AskFileName( "Select Plotfile", "C:\TEMP", "All Files |*.*|", "", 1 ) FilePtr = FileOpen( File, "READ" ) if !FilePtr Message( "ERROR", "can't read %PltDatei% " ) exit endif PlotTyp = -1 Record = FileRead( FilePtr ) while Record != "*EOF*" && PlotTyp < 0 Spr = StrUpper( Record ) if StrIndex( Spr, "PU;", 1, @FWDSCAN ) > 0 then PlotTyp = 1 ; HPGL if StrIndex( Spr, "PS-ADOBE", 1, @FWDSCAN ) > 0 then PlotTyp = 2 ; PS if StrIndex( Spr, "HPGL2", 1, @FWDSCAN ) > 0 then PlotTyp = 3 ; HPGL2 Record = FileRead( FilePtr ) endwhile ; EOF FileClose( FilePtr ) Message( "INFO", "Plottyp %PlotTyp%" ) exitI'm using now WinBatch 99, in the earlier '96-version this runs!Answer:
Add:IntControl(65,30000,0,0,0)Default line limit is 4096 bytes. Use IntControl 65 to set a new line limit.Maybe just add:
IntControl(65,30000,0,0,0)to the top of your program...
Article ID: W14355Filename: FileRead Error 1591.txt