Hacker News new | ask | show | jobs
by quarterto 4240 days ago
You could probably do this with node-applescript[0].

EDIT: ...which appears to be a simple wrapper around osascript.

[0]: https://github.com/TooTallNate/node-applescript

1 comments

There's now also the official Javascript for Automation[1], however I'm not sure how much that ties in with node.

[1]: https://developer.apple.com/library/mac/releasenotes/Interap...

Totally different runtime. There's no way (short of IPC) you can interface between node.js and Javascript for Automation. I suppose you could write a CommonJS Modules-compatible shim for Automation, but libraries assuming a node-like environment just wouldn't work.
Yeah, that's what I assumed. I guess it might make 'developing' slightly easier thought, keeping in the same language with Node + Automation, rather than Node + AppleScript.