On Windows, there are lots of options, depending on what program you
wish to automate (I'm not qualified to comment on other OS options).
Many programs have a COM (Win32OLE) interface that allows you to
remote-control it from Ruby. Some examples that come to mind are
Outlook, Excel, and Internet Explorer (you can find examples of these in
Ruby Garden). There is also a progrogram called AutoIt, which allows you
to launch programs, send keystrokes and mouse clicks, etc. to other
software. AutoIt has a COM interface, so that you could (for example)
make a call from Ruby to AutoIt via Win32OLE, telling AutoIt to send
Keystrokes to Notepad. One program I use, ThumbsPlus from Cerious
Software, doesn't have a COM interface, but can be controlled via an
older technology called DDE, which you can access from one of the Win32
libraries in Ruby. Another program I have, Pagemaker, doesn't have a COM
or DDE interface, but it has a scripting language, and I can control
Pagemaker by using Ruby to generate a script and launch Pakemaker with
the script as a parameter.
I hope this gives you some ideas. None of these techniques are not
unique to Ruby, but are very useful if you have a lot of automation to
do, especially when you are able to use more than one technique.
From: email@example.com [mailto:firstname.lastname@example.org] On Behalf
Of Chris Finch
Sent: Thursday, September 07, 2006 8:58 AM
To: ruby-talk ML
Subject: what can you automate with Ruby?
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,
Posted via http://www.ruby-forum.com/.