[Rubyosa-discuss] Sending keystrokes via System Events

Andy Hunt andy at pragmaticbookshelf.com
Tue Oct 31 11:31:48 EST 2006


Hi all,

I've trying to send keystrokes to a process that isn't otherwise  
scriptable.  There's a hunk of Applescript that does it like this:

set processName to (...)

tell application processName to activate

tell application "System Events"
     tell process processName
         keystroke "n" using {command down, option down}
         ...
     end tell
end tell



How can I do this using RubyOsa?  I'm not clear on the scope of the  
activate, the nesting, or passing parameters to "keystroke".  But  
other than that... :-)

thanks,

/\ndy



More information about the Rubyosa-discuss mailing list