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.
Frank