run-applescript
Run AppleScript and get the result
Last updated 6 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install run-applescript 
SYNC missed versions from official npm registry.

run-applescript

Run AppleScript and get the result

Install

npm install run-applescript

Usage

import {runAppleScript} from 'run-applescript';

const result = await runAppleScript('return "unicorn"');

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

API

runAppleScript(script, options?)

Returns a Promise<string> with the script result.

script

Type: string

The script to run.

options

Type: object

humanReadableOutput

Type: boolean
Default: true

Change the output style.

When false, returns the value in a recompilable source form.

signal

Type: AbortSignal

An AbortSignal that can be used to cancel the AppleScript execution.

runAppleScriptSync(script, options?)

Returns a string with the script result.

script

Type: string

The script to run.

options

Type: object

humanReadableOutput

Type: boolean
Default: true

Change the output style.

When false, returns the value in a recompilable source form.

Related

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

Current Tags

  • 7.1.0                                ...           latest (7 months ago)

13 Versions

  • 7.1.0                                ...           7 months ago
  • 7.0.0                                ...           2 years ago
  • 6.1.0                                ...           3 years ago
  • 6.0.0                                ...           5 years ago
  • 5.0.0                                ...           5 years ago
  • 4.0.0                                ...           6 years ago
  • 3.2.0                                ...           8 years ago
  • 3.1.0                                ...           8 years ago
  • 3.0.0                                ...           10 years ago
  • 2.1.0                                ...           10 years ago
  • 2.0.0                                ...           11 years ago
  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 38
This Month 56
Last Day 2
Last Week 25
Last Month 73
Dependencies (1)
Dev Dependencies (3)

Copyright 2013 - present © cnpmjs.org | Home |