# Interacting with another program

**URL:** <https://www.ruby-forum.com/t/interacting-with-another-program/105253>\
**Category:** Ruby\
**Created:** [May 28, 2007, 4:51am UTC](https://www.ruby-forum.com/t/interacting-with-another-program/105253 "2007-05-28T04:51:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![braas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f04885/32.png) [@braas](https://www.ruby-forum.com/u/braas)\
**Post date:** [May 28, 2007, 4:51am UTC](https://www.ruby-forum.com/t/interacting-with-another-program/105253/1 "2007-05-28T04:51:40Z")

</div>

Hi all, I’m completely new to this aspect of programming so please  
excuse me for any complete noobnes 🙂

I’m working on a project with a friend, where we have to read some data  
from a program and then make the program perfom an action based on a  
analysis of the data. We intend to make the program work without any  
manipulation of the cursor, if possible. The data analysis is easy, but  
I need a point in the right direction on the other stuff.

To summarize:

1. Read data from another program by ruby program

2. Data analysis by ruby program

3. action perform in the other program by ruby program

4. 

The program we’re interacting with does not log it’s actions to a file  
itself, so how do we get the data from it? I was thinking that we either  
read it from the memory (how?) or we find a way to copy each new line in  
the log the program is running in it’s window (again how?). This means  
that it obviously would be nice if the action our ruby program is to  
perform was event based. Can the WIN32OLE\_EVENT class be used for this  
purpose?

1. 

No problems here 🙂

1. 

Problems again here. I need to tell my ruby program how to make the  
other program perform an action here. I’m almost totally clueless on  
this one, but one thing I have noticed though, is that the directory of  
the program we are trying to control, there is a folder named “control”  
and it is filled dynamic link liberies. My guess is that I need to make  
the program issue some kind of command from one of these files? If so,  
is there a way to open these to see a list of available commands/action  
and how do I pass them on from the ruby program to the other program?

I guess thats it 🙂  
Please tell if I have not made myself completely clear in some way, and  
thanks for your time. I realise that some of might not a time to answer  
my questions completely, and in this case I hope you will take the time  
to merely point to a specific class that maybe will help me out.

Thanks
