Introduction to Scripting Bridge Programming Guide for Cocoa
Introduced in OS X v10.5, Scripting Bridge is a framework and a technology that makes it much easier for Cocoa developers to control and communicate with scriptable applications. Instead of incorporating AppleScript scripts in your application or dealing with the complexities of sending and handling Apple events, you can simply send Objective-C messages to an object that represents an application with a scripting interface. Your Cocoa application can do anything an AppleScript script can, but it does so in Objective-C code that is integrated with the rest of your project’s code.
The current version of Scripting Bridge has some limitations that are described in “About Scripting Bridge.”
Organization of This Document
This guide has the following chapters:
“About Scripting Bridge” describes what Scripting Bridge does and how it does it, and highlights the advantages it brings to Cocoa application development. It also gives an overview of Scripting Bridge classes and methods.
“Using Scripting Bridge” explains how to prepare your project for Scripting Bridge, how to obtain instances of scriptable applications, how to get and set object properties, how to add objects to a scriptable application, and how best to manipulate element arrays.
“Improving the Performance of Scripting Bridge Code” discusses ways in which you can make your Scripting Bridge code more efficient.
The following documents cover concepts and technologies related to Scripting Bridge: