What can you automate with Ruby?

Hi all,
I'm a newbie - please have patience.

I am not sure if anyone uses Ruby as an automation tool - I think it
would be a cool thing to do.

I have heard of the WIN32OLE extension - it sounds cool - does anyone
use this and why?

I was wondering if this automation only applies to these Windows
applications or is there any more you can control with a Ruby program?

I use the graphing application Origin - could I use Ruby to automate,
i.e. put data in and plot graphs.

Thanks in advance,

Chris

···

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

Chris Finch wrote:

Hi all,
I'm a newbie - please have patience.

I am not sure if anyone uses Ruby as an automation tool - I think it
would be a cool thing to do.

I have heard of the WIN32OLE extension - it sounds cool - does anyone
use this and why?

I was wondering if this automation only applies to these Windows
applications or is there any more you can control with a Ruby program?

I use the graphing application Origin - could I use Ruby to automate,
i.e. put data in and plot graphs.

Let me put it this way. If an automation facility exists that allows the
behavior of applications to be orchestrated by software, and if the
facility is reasonably flexible, then Ruby will be able to perform the
automations.

···

--
Paul Lutus
http://www.arachnoid.com

It depends on what you want to automate. Ruby can do (almost) anything
any other language can - on windows that means COM, commandlines,
WIN32API, registers, etc.
You can even automate GUIs via AutoIt .dll/COM interface, although in
most cases pure AutoIt is easier.

There is watir package to control/automate the browser if I've
understood it correctly.

On unix, the possibilities are similar, so the main question is, what
means/protocol/whatever you need to use to automate your target?

···

On 9/7/06, Chris Finch <christopher.finch@nuth.nhs.uk> wrote:

Hi all,
I'm a newbie - please have patience.

I am not sure if anyone uses Ruby as an automation tool - I think it
would be a cool thing to do.

I have heard of the WIN32OLE extension - it sounds cool - does anyone
use this and why?

I was wondering if this automation only applies to these Windows
applications or is there any more you can control with a Ruby program?

I use the graphing application Origin - could I use Ruby to automate,
i.e. put data in and plot graphs.

Thanks in advance,

Chris

Hi Chris,

Coincidentally, I am also a Ruby Newbie, and just found out about
WIN32OLE. So far, the documentation I've found is very spare. One
trick I did learn in combing through the web was to use your system to
print out the methods available for the various applications:

require 'win32ole'

# Win32OLE Variables
excel = WIN32OLE.new('Excel.Application')
word = WIN32OLE.new('Word.Application')

puts excel.methods
puts "\n\n"
puts excel.ole_methods

puts word.methods
puts "\n\n"
puts word.ole_methods
puts "\n\n"
puts word.Documents.ole_methods

This gave me at least a start. You might also want to look at the help
file that is available on Office Automation at
http://support.microsoft.com/kb/302460/.

If anyone else has any information on Office Automation, and
specifically how it fits into Win32OLE, I'd really appreciate it - what
I'd really like to have is a "canonical" list of all methods for each
available Office module. But I haven't found anything close to that
yet.

James

Chris Finch wrote:

···

Hi all,
I'm a newbie - please have patience.

I am not sure if anyone uses Ruby as an automation tool - I think it
would be a cool thing to do.

I have heard of the WIN32OLE extension - it sounds cool - does anyone
use this and why?

I was wondering if this automation only applies to these Windows
applications or is there any more you can control with a Ruby program?

I use the graphing application Origin - could I use Ruby to automate,
i.e. put data in and plot graphs.

Thanks in advance,

Chris

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

If an automation facility exists

Is there a standard way to find out if an application enables
automation? or can you suggest a way?

if the
facility is reasonably flexible

Could you expand upon this please?

Thankyou
Chris

···

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

Chris Finch wrote:

If an automation facility exists

Is there a standard way to find out if an application enables
automation? or can you suggest a way?

if the
facility is reasonably flexible

Could you expand upon this please?

Okay, a decent, flexible automation facility will allow calls using
plain-text arguments. Some proprietary automation facilities require rather
baroque instructions, and a lot of very specific coding (like C-style
structures). My remark appplies to the former case.

What I am saying is Ruby code is at best platform-independent, so it
shouldn't require a native-code section in order to accomplish its goals.

···

--
Paul Lutus
http://www.arachnoid.com