time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

readme.md (551B)


      1 # run-applescript
      2 
      3 > Run AppleScript and get the result
      4 
      5 ## Install
      6 
      7 ```
      8 $ npm install run-applescript
      9 ```
     10 
     11 ## Usage
     12 
     13 ```js
     14 import {runAppleScriptAsync} from 'run-applescript';
     15 
     16 const result = await runAppleScriptAsync('return "unicorn"');
     17 
     18 console.log(result);
     19 //=> 'unicorn'
     20 ```
     21 
     22 ## API
     23 
     24 ### runAppleScriptAsync(script)
     25 
     26 Returns a `Promise<string>` with the script result.
     27 
     28 ### runAppleScriptSync(script)
     29 
     30 Returns a `string` with the script result.
     31 
     32 ## Related
     33 
     34 - [run-jxa](https://github.com/sindresorhus/run-jxa) - Run JXA code and get the result