@angrykiller/run-applescript

3.2.0 • Public • Published

run-applescript Build Status

Run AppleScript and get the result

Install

$ npm install run-applescript

Usage

const runApplescript = require('run-applescript');

(async () => {
	const result = await runApplescript('return "unicorn"');

	console.log(result);
	//=> 'unicorn'
})();

API

runAppleScript(script)

Returns a Promise<string> with the script result.

runAppleScript.sync(script)

Returns a string with the script result.

runAppleScript.noExec(script)

Returns a Promise<string> with the script result (executed without "-e" parameter in osascript).

runAppleScript.noExecSync(script)

Returns a string with the script result (executed without "-e" parameter in osascript).

Related

  • run-jxa - Run JXA code and get the result

License

MIT © Sindre Sorhus

Dependencies (1)

Dev Dependencies (2)

Package Sidebar

Install

npm i @angrykiller/run-applescript

Weekly Downloads

1

Version

3.2.0

License

MIT

Unpacked Size

3.52 kB

Total Files

4

Last publish

Collaborators

  • angrykiller