Skip to content

Instantly share code, notes, and snippets.

@n-bar
Forked from JMichaelTX/JXA Resources.md
Created November 22, 2016 20:33
Show Gist options
  • Save n-bar/5ad9490184c115a5e5dbb99b0778eb83 to your computer and use it in GitHub Desktop.
Save n-bar/5ad9490184c115a5e5dbb99b0778eb83 to your computer and use it in GitHub Desktop.
JavaScript for Automation (JXA) Resources

JXA Resources

Revised: 2016-08-29 23:28 CT (Mon)

image

This is a list of the key resources I have found useful. If you know of others, please post in a comment below, and I will add to this list.

I have tried to order this list in the order that, to me, is best for learning JXA from scratch. We all learn a bit diferently, so adjust to suit your style/needs. Please post if you have suggestions on learning JXA.

  • I like starting with the videos in the Introduction.
  • You won't be able to understand or remember everything the first time through, but it should help to give you the big picture, and maybe a few concepts.
  • After you have read some of the other references, and played around with JXA for a while, you may find it worthwhile to view the video's again -- I picked up a lot more my second viewing.
  • The same thing goes for the Apple Release Notes. These will be much more meaningful the 2nd or 3rd time you read them (at least it was for me)
  • I am still learning JXA, just like you. So please feel free to post any suggestions/corrections that you may have.

####Important Requirements

  • You must be running at least OS X Yosemite (10.10.3) to use JXA
  • It is best to be running OS X El Capitan (10.11.4), since a number of JXA bugs and enhancements were made. (I'm still not updating to 10.11.5 until I see a number of issues fixed)

###Introduction

  1. Video -- JXA Introduction by Sal Soghoian, post 2014 WWDC (~25 min), 2014-?
  2. Video -- 2014 WWDC session video on JXA. (can view ONLY in Safari), (~53 min), 2014-06-02

###Official Apple Reference

  1. Mac Automation Scripting Guide -- AppleScript & JXA, 2016-06-13
  2. JXA Release Notes in Yosemite 10.10, 2014-10-17
  3. JXA Release Notes in El Capitan 10.11, 2015-09-16
  4. AppleScript Language Guide
  • Although this guide provides examples in AppleScript, almost all of the concepts and commands also apply to JXA.
  • Use this guide as needed to obtain more insight into Mac automation via scripting
  1. Scripting Reference Forms
  • This is one section of the guide that applies fully to both AppleScript and JXA, just a difference in syntax.

###Debugging 10. Debugging JXA with the Safari Web Inspector, OS X 10.11 Release Notes, 2015-09-16

###Getting Started

  1. OS X Yosemite & Automation, 2014-?
    • (scroll down about 3-4 screens until you see "JavaScript for Automation")
  2. JXA: Getting Started with Javascript for Automation, 2014-12-02
  3. Extensibility and Automation Changes in OS X Yosemite, 2014-10-17
  4. How to Install AppleScripts or JXA Scripts, 2016-02-13

###Third Party Reference

  1. JXA Cookbook Wiki

###Using JXA with Objective-C and Cocoa

  1. Objective-C Bridging with AppleScript & JXA, 2016-03-21
  2. Using Objective-C with JXA (JXAObjC), 2015-09-16

###User Forums with Topics on JXA

  1. Keyboard Maestro Topics Tagged with JXA
  2. Stackoverflow.com Questions Tagged with JXA
  3. Stackoverflow.com Questions Tagged with javascript-automation

JavaScript Resources

Although the focus here is JXA, clearly a good knowledge of the core JavaScript is essential. So here's my list:

  1. JavaScript Ref Guide, Tutorials, & Documentation -- Mozilla
  2. Douglas Crockford's Javascript Web Site
  3. JavaScript: The Good Parts -- by Douglas Crockford (Kindle Edition)
  4. A Smarter Way to Learn JavaScript -- by Mark Myers (Kindle Edition)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment