title: Getting output from a shell/dos app into a Delphi app
body: <p>I have a commandline application coded in delphi that I need to call from a normal desktop application (also coded in delphi). In short, I want to call the commandline app and display the text it outputs "live" in a listbox.</p>
  
  <p>It's been ages since I have played around with the shell, but I distinctly remember that in order to grab the text from a commandline app - I have to use the pipe symbol ">". Like this:</p>
  
  <p>C:/mycmdapp.exe >c:/result.txt</p>
  
  <p>This will take any text printed to the shell (using writeLn) and dump it to a textfile called "result.txt".</p>
  
  <p>But.. (and here comes the pickle), I want a live result rather than a backlog file. A typical example is the Delphi compiler itself - which manages to report back to the IDE what is going on. If my memory serves me correctly, I seem to recall that I must create a "pipe" channel (?), and then assign the pipe-name to the shell call.</p>
  
  <p>I have tried to google this but I honestly was unsure of how to formulate it. Hopefully someone from the community can point me in the right direction.</p>
  
  <p><strong>Updated</strong>: This question might be identical to <a href="https://stackoverflow.com/questions/1454501/how-do-i-run-a-command-line-program-in-delphi">How do I run a command-line program in Delphi?</a>. Some of the answers fit what I'm looking for, although the title and question itself is not identical.</p>