Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/JXA-Cookbook/JXA-Cookbook

Cookbook for JavaScript for Automation in Mac OS X Yosemite
https://github.com/JXA-Cookbook/JXA-Cookbook

catalina cookbook el-capitan javascript jxa wiki yosemite

Last synced: 15 days ago
JSON representation

Cookbook for JavaScript for Automation in Mac OS X Yosemite

Awesome Lists containing this project

README

        

[JavaScript for Automation Cookbook][wiki]
==================================

JavaScript for Automation is a new thing in Mac OS X Yosemite.
It allows you to control applications using JavaScript language. How awesome!

However, [its documentation](https://developer.apple.com/library/mac/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/index.html) covers the basics of using JavaScript to interact with the Open Scripting Architecture.
For many tasks in scripting, there's a lot to figure out, and many different documentations to refer to.

So I created this JavaScript for Automation cookbook that features a lot of examples, such as:

- How to [display alert, prompt and confirm dialogs](https://github.com/dtinth/JXA-Cookbook/wiki/User-Interactions).
- How to [run shell scripts](https://github.com/dtinth/JXA-Cookbook/wiki/Shell-and-CLI-Interactions).
- How to [create a command-line script](https://github.com/dtinth/JXA-Cookbook/wiki/Using-JavaScript-for-Automation#creating-a-shebang-script) (shebang script) and read `argv` arguments, how to create a [Mac OS X service](https://github.com/dtinth/JXA-Cookbook/wiki/Using-JavaScript-for-Automation#creating-a-mac-os-x-service), or how to [invoke the REPL](https://github.com/dtinth/JXA-Cookbook/wiki/Using-JavaScript-for-Automation#running-the-repl-read-eval-print-loop).
- How to [use Browserify to be able to require npm modules](https://github.com/dtinth/JXA-Cookbook/wiki/Exotic-Recipes#requiring-commonjs-and-npm-modules-using-browserify) in JXA.

Where it makes sense, I try to link to the official documentation as much as possible so you can dive deeper.

For ease of editing and contribution, the cookbook's contents are on the [wiki][].

[![Enter Wiki](https://svg-buttons.herokuapp.com/button/plain.svg?button_width=400&text=Enter+Wiki)][wiki]

[wiki]: https://github.com/dtinth/JXA-Cookbook/wiki