Access contents of the output windows

hello
I am running this as a separate thread.
  system("start E:\\TradingTools\\IBController\
\IBControllerStart_customised.bat")

how can i access the stdout of this tread- basically capturing all the
data streaming out of this dos window of this batch file exectuion.
thaks in advance

Junkone wrote:

hello
I am running this as a separate thread.
  system("start E:\\TradingTools\\IBController\
\IBControllerStart_customised.bat")

how can i access the stdout of this tread- basically capturing all the
data streaming out of this dos window of this batch file exectuion.
thaks in advance

Hi.
You can try using IO.popen (`ri IO.popen` from the command line) or try installing the win32-open3 gem, which allows you to easily pipe standard input, standard output and standard error into separate I/O pipes.

···

--
Matthew Harris

Junkone wrote:

hello
I am running this as a separate thread.
  system("start E:\\TradingTools\\IBController\
\IBControllerStart_customised.bat")

how can i access the stdout of this tread- basically capturing all the
data streaming out of this dos window of this batch file exectuion.

Maybe this works for you:
output = `start
E:\\TradingTools\\IBController\\IBControllerStart_customised.bat`

Note the " ` ", it's a backtic, not a single quote (" ' ").

see System function respond - Ruby - Ruby-Forum

···

--
Posted via http://www.ruby-forum.com/\.