[MacRuby-devel] some AppleScript-related hints
rdm at cfcl.com
Mon Nov 14 16:12:52 PST 2011
At 5:06 PM -0600 11/14/11, Sophie wrote:
> I am trying to automate OmniGraffle using MacRuby,
> and cannot figure out how to map Applescript to
> available MacRuby methods.
Here are some hints which may be useful...
Many apps are not intrinsically cooperative with AppleScript
(eg, they don't publish their dictionaries). Fortunately,
there's a way to talk to them regardless:
Start "(Apple) > System Preferences".
Click on "Universal Access".
Click on "Enable access for assistive devices".
I _strongly_ recommend spending US$55 on UI Browser, a really
handy tool for inspecting an app's scripting capabilities:
I've never tried Scripting Bridge, because the Googling I did
led me to use rb-appscript instead. It has worked quite well
for me, by and large (though I haven't tried it with MacRuby):
Finally, if you get totally stuck on AppleScript (and you're
on a funded project :-), consider bringing in an expert, eg:
http://www.cfcl.com/rdm Rich Morin
http://www.cfcl.com/rdm/resume rdm at cfcl.com
http://www.cfcl.com/rdm/weblog +1 650-873-7841
Software system design, development, and documentation
More information about the MacRuby-devel