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:

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.

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 http://www.ruby-forum.com/topic/136336

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs