UNPKG

814 BMarkdownView Raw
1<!-- Title -->
2<h1 align="center">
3👋 Welcome to <br><code>@expo/osascript</code>
4</h1>
5
6<p align="center">Tools for running osascripts in Node.</p>
7
8<p align="center">
9 <img src="https://flat.badgen.net/packagephobia/install/@expo/osascript">
10
11 <a href="https://www.npmjs.com/package/@expo/osascript">
12 <img src="https://flat.badgen.net/npm/dw/@expo/osascript" target="_blank" />
13 </a>
14</p>
15
16<!-- Body -->
17
18## Example
19
20```sh
21 ccheever@Charless-MacBook-Air:~/projects/osascript$nesh -y
22 .Node v4.1.0
23 Type .help for more information
24 nesh*> .require .
25 osascript = require("/Users/ccheever/projects/osascript")
26 nesh*> yield osascript.execAsync('tell app "System Events" to count processes whose name is "Simulator"')
27 '1\n'
28 nesh*> yield osascript.spawnAsync('quit app "Safari"')
29 0
30 nesh*>
31```