1 | # osascript
|
2 | Tools for running an osascripts in Node
|
3 |
|
4 | ```js
|
5 | ccheever@Charless-MacBook-Air:~/projects/osascript$nesh -y
|
6 | .Node v4.1.0
|
7 | Type .help for more information
|
8 | nesh*> .require .
|
9 | osascript = require("/Users/ccheever/projects/osascript")
|
10 | nesh*> yield osascript.execAsync('tell app "System Events" to count processes whose name is "Simulator"')
|
11 | '1\n'
|
12 | nesh*> yield osascript.spawnAsync('quit app "Safari"')
|
13 | 0
|
14 | nesh*>
|
15 | ```
|