Methods
command(eventCode, param1,) → {String}
Given an event code and additional parameters, return the AppleScript command.
Parameters:
Name | Type | Description |
---|---|---|
eventCode |
String | |
param1, |
mixed | param2, ... |
Returns:
TODO : move into module
- Type
- String
quote(str)
Returns the string enclosed by double quotes, with all double quotes escaped
Parameters:
Name | Type | Description |
---|---|---|
str |
String |
removeQuotes(item)
Trims the result of an OSA call to Bookends, removing the quotes at the beginning/end
Parameters:
Name | Type | Description |
---|---|---|
item |
String |
runOsaCmd(cmd, debug) → {Promise.<*>}
Execute a command via OSA and process the result. Returns a Promise
that resolves to an array of Strings (splitChar: String|undefined) or a
String (splitChar: false).
Parameters:
Name | Type | Default | Description |
---|---|---|---|
cmd |
String | ||
debug |
Boolean | false | If true, log diagnostic information to the console |
Returns:
- Type
- Promise.<*>