program File_Read_Write_Sample; // This sample scripts shows how to // write to a file and read the contents const InputFile = 'c:\temp\test.txt'; procedure ReadFile; var str : string; begin Reset(InputFile); while not(EndOfFile) do begin Readfl(Str); showmessage(Str); end; CloseFile; end; procedure OnDocumentComplete(URL : string); begin end; begin // write to file Rewrite(InputFile); Writefl('Hello'); Writefl('World!'); CloseFile; // read contents ReadFile; end.