2. Interface
osax.scriptingadditions()
The scriptingadditions
function lists the names of all installed scripting additions:
import osax
print osax.scriptingadditions()
# Result: ["Digital Hub Scripting", "StandardAdditions", ...]
osax.OSAX
The OSAX
class represents a single scripting addition and its target application. OSAX
is a subclass of appscript's Application
class, and its constructor is the same apart from the additional osaxname
argument:
OSAX(osaxname="StandardAdditions",
name=None, id=None, creator=None, url=None, terms=True)
osaxname : str -- name of scripting addition
name : str -- name or path of application, e.g. 'System Events',
'/System/Library/CoreServices/System Events.app'
id : str -- bundle id of application,
e.g. 'com.apple.systemevents'
creator : str -- 4-character creator type of application,
e.g. 'sevs'
url : str -- eppc URL of remote process,
e.g. 'eppc://G5.local/System%20Events'
terms : module | bool -- if a module, get terminology from it;
if True, get terminology from target osax;
if False, use built-in terminology only