I have code that looks more or less like the code below but it doesn't retrieve text from the application I'm opening (notepad). Maybe I'm missing the point. Can someone explain what a Standard Output Stream is and whether in fact it's what I want to use if I want to open an application and then retrieve the text it displays?
ProcessStartInfo psi = new ProcessStartInfo("notepad.exe", "c:\\test.txt");
psi.RedirectStandardOutput = true;
psi.UseShellExecute = false;
Process p = new Process();
p.StartInfo = psi;
p.Start();
string s = p.StandardOutput.ReadToEnd();