what can you automate with Ruby?

C

Chris Finch

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
 
J

Jan Svitok

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

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?
 
C

Chris Finch

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
 
J

James Calivar

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
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top