# Access contents of the output windows

**URL:** <https://www.ruby-forum.com/t/access-contents-of-the-output-windows/124072>\
**Category:** Ruby\
**Created:** [December 24, 2007, 11:50am UTC](https://www.ruby-forum.com/t/access-contents-of-the-output-windows/124072 "2007-12-24T11:50:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Junkone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e274bd/32.png) [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Post date:** [December 24, 2007, 11:50am UTC](https://www.ruby-forum.com/t/access-contents-of-the-output-windows/124072/1 "2007-12-24T11:50:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Junkone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e274bd/32.png) [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Post date:** [December 24, 2007, 12:42pm UTC](https://www.ruby-forum.com/t/access-contents-of-the-output-windows/124072/2 "2007-12-24T12:42:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Junkone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e274bd/32.png) [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Post date:** [December 24, 2007, 1:01pm UTC](https://www.ruby-forum.com/t/access-contents-of-the-output-windows/124072/3 "2007-12-24T13:01:08Z")

</div>

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