Where to Go From Here?
You can download the final version of the sample project here.
There wasn’t room to cover inter-app communication in this making a mac app scriptable tutorial, but to see how to work between apps, check out 8. Inter-App Communication.scpt for some examples. This script gathers a list of incomplete tasks due today and tomorrow, inserts them into a new TextEdit file, styles the text and saves the file.
For more information about scriptable apps, the official Apple docs on Scriptable Applications are a good start, as is Apple’s Overview of Cocoa Support for Scriptable Applications.
Interested in learning more about JXA? Check out the Introduction to JavaScript for Automation Release Notes.
I hope you enjoyed this making a mac app scriptable tutorial; if you have any questions or comments, please join the forum discussion below!