kjelsrud.dev/node_modules/run-applescript
2023-07-19 21:31:30 +02:00
..
node_modules 🎉 initiate project *astro_rewrite* 2023-07-19 21:31:30 +02:00
index.d.ts 🎉 initiate project *astro_rewrite* 2023-07-19 21:31:30 +02:00
index.js 🎉 initiate project *astro_rewrite* 2023-07-19 21:31:30 +02:00
license 🎉 initiate project *astro_rewrite* 2023-07-19 21:31:30 +02:00
package.json 🎉 initiate project *astro_rewrite* 2023-07-19 21:31:30 +02:00
readme.md 🎉 initiate project *astro_rewrite* 2023-07-19 21:31:30 +02:00

run-applescript

Run AppleScript and get the result

Install

$ npm install run-applescript

Usage

import {runAppleScriptAsync} from 'run-applescript';

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

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

API

runAppleScriptAsync(script)

Returns a Promise<string> with the script result.

runAppleScriptSync(script)

Returns a string with the script result.

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