Merging Scripting Additions
You may want to call commands defined in Scripting Additions terminologies. A
popular one is
StandardAdditions, delivered in Mac OS X as
To do this, call
#merge on your application object:
app = OSA.app('iTunes') app.merge('StandardAdditions') app.beep puts app.choose_file
StandardAdditions API will be merged into the
application object, allowing you to call new methods on it.
The example above will ask iTunes to emit a beep, then to present the file chooser window. The chosen path will be printed to the standard output on success, otherwise an exception will be raised (e.g., if the user cancels the window).
#merge method works like
can also provide either the signature, bundle ID or full path to a
scriptable addition by using the options
rdoc-osa tool has the ability to
for Scripting Additions.