thanks, did I make it into function form properly:
function searchInTextFile(%file,%string)
{
%file = new FileObject();
%file.openForRead(%path);
while(!%file.isEoF())
{
%line = %file.readLine();
if(%line $= %string)
{
%file.close();
%file.delete();
return %linesRead;
}
%linesRead++;
}
%file.close();
%file.delete();
}
EDIT: I redid the syntax