0.2.0 • Published 7 years ago

applescript-js v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

applescript-js

Run AppleScript scripts from NodeJS

Install

$ npm install --save applescript-js

Usage

const AppleScript = require('applescript-js');

let script = new AppleScript('tell application "Safari" to get URL of current tab of window 1');

script.run(); // => 'https://github.com/'

API

AppleScript#compile() -> boolean

Compile the script, if it is not already compiled. This method throws an error if there's a problem compiling the script.

AppleScript#run() -> string

Execute the script, compiling it first if it is not already compiled. This method throws an error if there's a problem running the script.

AppleScript#source

The source code of the script

AppleScript#compiled

A boolean value indicating whether the script has been compiled

License

MIT © Lukas Kollmer

0.2.0

7 years ago

0.1.0

8 years ago