access contents of the output windows

J

Junkone

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
 
M

Matthew Harris

Junkone said:
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.
 
S

Siep Korteling

Junkone said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top