Run AppleScript and get the result
$ npm install run-applescript
const runApplescript = require('run-applescript');
(async () => {
const result = await runApplescript('return "unicorn"');
console.log(result);
//=> 'unicorn'
})();
Returns a Promise<string>
with the script result.
Returns a string
with the script result.
Returns a Promise<string>
with the script result (executed without "-e" parameter in osascript).
Returns a string
with the script result (executed without "-e" parameter in osascript).
- run-jxa - Run JXA code and get the result
MIT © Sindre Sorhus