title: Delphi 5 WriteLn to Console AND Text File
body: <p>I have made an console application (A) which runs independently every day to download files and uses <code>WriteLn('text')</code> to display progress in the console. 
  I then have another GUI application (B) which displays that data in tables, but can also call the first program (A) using ShellExecute. </p>
  
  <p>I need (A) to write a log to a text file as well as display it's progress, so I have two questions:</p>
  
  <ul>
  <li><p>Is there a faster / less tedious way of outputting to textfile AND console other than using AssignFile(F,log.txt) and then find/replacing every WriteLn with:</p>
  
  <p>WriteLn('my output text');
  WriteLn(F,'my output text');</p></li>
  <li><p>Is there a way for my GUI application (B) to display the output from (A) in realtime from the text file, or at least know when (A) is complete. At present I display a message "Please wait for external import to complete and press OK" after which it refreshes the tables.</p></li>
  </ul>
  
  <p>Thanks</p>