Page 1 of 1

Capture streaming cli output?

Posted: 07 Jan 2017, 12:46
by drawback
Hi,

is it possible to read in the output line after line that a cli program creates (e.g. in a command prompt)?

In this particular case I'd like to capture the output of rsync.exe (but not when it's finished but with
every new line that it spits out) and display it in e.g. an edit field in a gui...

I should run under x86 + x64 and it needs to support unicode output.

Does something like this already exists?

Re: Capture streaming cli output?

Posted: 07 Jan 2017, 14:42
by smarq8
https://autohotkey.com/board/topic/9690 ... douttovar/

here are 2 version
StdOutToVar that return only once after end and of execute command
and
StdOutStream - watch in live any messages (eg. ping google.pl -t)

Re: Capture streaming cli output?

Posted: 08 Jan 2017, 04:19
by Guest
Have you tried the example(s) on the Run page - RunWaitOne - https://autohotkey.com/docs/commands/Run.htm ? You can find more examples if you search the forum. (search for WScript.Shell)