Chapter 21. Adding Scripting

There are, generally speaking, two forms of scripting that an application can support. The first is in-application scripting, where the application provides a runtime environment for hosting scripts and runs them itself. The second is cross-application scripting, where scripts run outside the process and send it messages.

In-application scripting is very useful for automating repetitive tasks. It allows users to join together sequences of actions, and run them again easily. Macros in a text editor are one of the classic examples of this kind of scripting. They don’t interact with anything outside of the editor, and they are generally “programmed” by turning on a recording mode and doing something, and then playing ...

Get Cocoa® Programming Developer’s Handbook, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.