Run AppleScript and get the result
npm install run-applescript> Run AppleScript and get the result
``sh`
npm install run-applescript
`js
import {runAppleScript} from 'run-applescript';
const result = await runAppleScript('return "unicorn"');
console.log(result);
//=> 'unicorn'
`
Returns a Promise with the script result.
#### script
Type: string
The script to run.
#### options
Type: object
##### humanReadableOutput
Type: boolean\true
Default:
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.
Returns a string with the script result.
#### script
Type: string
The script to run.
#### options
Type: object
##### humanReadableOutput
Type: boolean\true
Default:
Change the output style.
When false`, returns the value in a recompilable source form.
- run-jxa - Run JXA code and get the result