Karl von Laudermann
2/18/2008 1:59:00 PM
On Feb 17, 7:41 pm, Stedwick <philip.broc...@gmail.com> wrote:
> Well, how about this: is there something like AutoIt for the Mac (if I
> can control it with Ruby, so much the better)?
>
> I tried rb-appscript already, but I couldn't figure out how to send
> keystrokes =P
There's also rubyosa as an alternative to rb-appscript. (But I have
not used it and couldn't tell you anything about it.)
Another option is to use JRuby, so you have access to Java's API
library, and then use Java's Robot class to send keystrokes. (http://
java.sun.com/j2se/1.5.0/docs/api/java/awt/Robot.html) Unlike with
Applescript, there's no way to send events to a specific app; you just
have to make sure that Safari is the active app at the time your
script "types" the keys.