I have made an console application (A) which runs independently every day to download files and uses WriteLn('text')
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.
I need (A) to write a log to a text file as well as display it's progress, so I have two questions:
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:
WriteLn('my output text'); WriteLn(F,'my output text');
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.
Thanks