Read text file into a mAirlist script ?

Hi again,

Linked to my previous request, I’m wondering if it’s possible to read the content of a text file into mAirlist scripts ?
This is for a very specific purpose : the text file will return an integer value needed by the mAirlist scripts…

Into documentation, I didn’t find anything : I think it’s not possible, but I’d like a confirmation :slight_smile:

Thank you.
Regards,


Theo

You have to use a TStringList object and the LoadFromFile method:

var
  sl: TStringList;

begin
  sl := TStringList.Create;
  try
    sl.LoadFromFile('x.txt');

    // do something with sl
    // individual lines are in sl[0] etc.
    // entire text is in sl.Text
  finally
    sl.Free;
  end;
end.