What's the equivalent of "do shell script" with javascript automations? (Yosemite)
Support for javascript automations started with Yosemite.
How could I run using javascript an external command? (i.e. the equivalent of do shell script
of applescript?
If you look in the StandardAdditions.sdef.
- Menubar menu: Windows -> Library
- Double click on: StandardAdditions
- Change the dropdown to Javascript.
You will see that many of the script command change to the camelHump syntax
app = Application.currentApplication()
app.includeStandardAdditions = true;
app.doShellScript('ls')