I have searched a lot but nothing worked...this code gives me the result when the console ends. but I want real-time output!
- is there any way to achieve this?
string text1 = "C:/Program Files/Sycho_DL/Downloader.exe -f 242+250 --merge-output-format mp4 -o " + DPath + "/%(title)s.%(ext)s ";
string me2me1 = text1 + urlBoxText2;
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = @"C:/Program Files/Sycho_DL/Downloader.exe";
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.Arguments = me2me1;
startInfo.UseShellExecute = false;
startInfo.CreateNoWindow = true;
startInfo.RedirectStandardInput = true;
startInfo.RedirectStandardOutput = true;
var process = Process.Start(startInfo);
process.Start();
process.WaitForExit();
while (!process.StandardOutput.EndOfStream)
{
string line = process.StandardOutput.ReadLine();
richbox1.Text = line;
}