Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How cai i filter a .log lile

Status
Not open for further replies.

moreth

Programmer
Dec 3, 2001
3
BR
I wanna filter a .log file and get only the lines that have the word 'commands' on it.
I´m using the folowing script:

procedure TForm1.Button2Click(Sender: TObject);
begin
AssignFile(arq,filelist.FileName);
Reset(arq);
While not EOF(arq) do
begin
readln(arq, rec);
i := Pos('commands', rec);
if i <> 0 then text2.Items.Append(rec);
end;
end;

text2 is an listbox.
when the file is too long i get the error 'EOUTOfResources &quot;unable to insert line&quot;'.
what is the best object i can use ???
i tried to use richtext but it´s not working.

Thanks Rodrigo Moreth
 
Maybe your machine is too loaded with running programs, and you have to disable some of them. S. van Els
SAvanEls@cq-link.sr
 
I have a PIII 700 MHZ with 256Mb RAM and nothing runnin on it. I dont belive this is the problem.
 
hi,

In your code i miss one line: CloseFile(arq).

Could you say how big these files are. I think their is a limitation in the size of the characters in an control.
Running around in the helpfile i found that the maxlength of a control is limited by the OS.

Steph
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top