[MacRuby-devel] some AppleScript-related hints

Rich Morin 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...

-r


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:

  http://pfiddlesoft.com/uibrowser/


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):

  http://appscript.sourceforge.net/
  http://appscript.sourceforge.net/rb-appscript/index.html

  http://www.apeth.com/rbappscript/00intro.html#XXXtoc


Finally, if you get totally stuck on AppleScript (and you're
on a funded project :-), consider bringing in an expert, eg:

  Ben Waldie
  http://www.automatedworkflows.com/
-- 
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 mailing list