Jump To:
Leopard Reference Library: Scripting & Automation
Cocoa applications can take advantage of automated support supplied by the Foundation and Application Kit frameworks to make their applications scriptable. A scriptable application is one that is capable of performing operations or returning data in response to AppleScript scripts. Cocoa applications can also control other scriptable applications.

View all Cocoa Reference Library.
Document Descriptions
On Off
Display

Sort by
Title
Sort by
Resource Type
Sorted by
Date
SBSystemPrefs (HTML) (DMG) (ZIP)
Shows how to use Scripting Bridge to display a preference pane in System Preferences.
Sample Code 2008-10-13
SimpleScriptingObjects (HTML) (DMG) (ZIP)
How to add scriptable objects to an AppleScriptable application.
Sample Code 2008-06-02
SimpleScriptingProperties (HTML) (DMG) (ZIP)
How to add some properties to the terminology provided by an AppleScriptable application.
Sample Code 2008-06-02
SimpleScriptingVerbs (HTML) (DMG) (ZIP)
How to add verbs to the terminology provided by an AppleScriptable application.
Sample Code 2008-06-02
ScriptingDefinitions (HTML) (DMG) (ZIP)
Provides a starting sdef (scripting definition) and a completed one for the Sketch example code.
Sample Code 2008-05-30
SimpleScripting (HTML) (DMG) (ZIP)
Illustrates the minimal steps required to make an application scriptable.
Sample Code 2008-05-30
AppleScript Language Guide (HTML) (PDF)
Defines the AppleScript scripting language. Includes many brief sample scripts.
Guides 2008-03-11
Cocoa Scripting Guide (HTML) (PDF)
Explains how to create scriptable Cocoa applications that use the scripting definition (sdef) format.
Guides 2008-03-11
Scripting Bridge Programming Guide for Cocoa (HTML) (PDF)
Describes the Scripting Bridge technology, which bridges OSA-compliant applications to Objective-C, and explains how to use it in Cocoa programs.
Guides 2008-03-11
ScriptingBridgeFinder (HTML) (DMG) (ZIP)
Using the Finder with Scripting Bridge
Sample Code 2007-12-13
AppleScript Studio Terminology Reference (HTML) (PDF)
Describes the scripting terminology for AppleScript Studio, through version 1.4.
Reference 2007-10-31
Foundation Release Notes (HTML)
Describes new features, notes, and known issues for the Foundation framework in Mac OS X v10.5.
Release Notes 2007-10-31
NSScriptKeyValueCoding Protocol Reference (HTML) (PDF)
Describes the informal protocol used to provide additional key-value coding capabilities in a scriptable application.
Reference 2007-10-31
Ruby and Python Programming Topics for Mac OS X (HTML) (PDF)
Describes Ruby and Python on Mac OS X, and especially the bridges between them and Objective-C and OSA (AppleScript).
Guides 2007-10-31
Scripting Bridge Release Note (HTML)
A release note that describes the classes and techniques used to control scriptable applications from Objective-C code.
Release Notes 2007-10-31
Automator Reference Update (HTML) (PDF)
Summarizes the symbols added to the Automtor framework.
Release Notes 2007-07-25
NSScriptCommand Class Reference (HTML) (PDF)
Describes the class used to represent a scripting statement and the information needed to perform the operation it specifies.
Reference 2007-07-20
NSScriptClassDescription Class Reference (HTML) (PDF)
Describes the class used to encapsulate the scriptability information for a scriptable class.
Reference 2007-07-17
Checkout Lets You 'Get a Mac, Start a Store': Madebysofa Does It with Python and Cocoa (HTML)
Success story on how Mac-only Checkout was built using Python and Cocoa.
Articles 2007-07-10
NSAppleScript Class Reference (HTML) (PDF)
Describes the class that provides the ability to load, compile, and execute scripts.
Reference 2007-07-10
NSPositionalSpecifier Class Reference (HTML) (PDF)
Describes the class used to specify an insertion point in a container relative to another object in the container.
Reference 2007-06-29
NSScriptObjectSpecifier Class Reference (HTML) (PDF)
Describes the abstract class used to instantiate objects that represent references to scriptable objects.
Reference 2007-06-29
AutoSample (HTML) (DMG) (ZIP)
How to run and display Automator workflows in your application.
Sample Code 2007-05-23
NSAppleEventDescriptor Class Reference (HTML) (PDF)
Describes the class used to access the basic data structures in an Apple event.
Reference 2007-04-10
NSScriptCommandDescription Class Reference (HTML) (PDF)
Describes the class used to provide a description of a script command.
Reference 2007-04-10
NSScriptSuiteRegistry Class Reference (HTML) (PDF)
Describes the class used as the top-level repository of scriptability information for an application at runtime.
Reference 2007-04-10
NSIndexSpecifier Class Reference (HTML) (PDF)
Describes the position of an object in a collection.
Reference 2007-04-01
Automator Framework Reference (HTML) (PDF)
Describes the Objective-C API for creating and working with actions used by the Automator application.
Reference 2006-10-26
Using AppleScript Scripts in Cocoa Applications (HTML)
TN2084: Explains how to work with AppleScript scripts in your Cocoa application.
Technical Notes 2006-09-19
HelloStudio (HTML) (DMG) (ZIP)
This is a Hello, world application built using AppleScript Studio.
Sample Code 2006-07-28
Processes (HTML) (DMG) (ZIP)
This process management application uses most of AppleScript Studio's significant features.
Sample Code 2006-07-28
TextEditPlus (HTML) (DMG) (ZIP)
This application is a version of TextEdit enhanced with additional document properties using AppleScript Studio.
Sample Code 2006-07-28
AttachAScript (HTML) (DMG) (ZIP)
Illustrates how you can extend any Cocoa application by adding some AppleScripts to it.
Sample Code 2006-07-27
NSCloseCommand Class Reference (HTML) (PDF)
Describes the class used to close a scriptable object or objects--typically a document or window.
Reference 2006-06-28
NSRelativeSpecifier Class Reference (HTML) (PDF)
Describes the class used to specify an object in a collection by its position relative to another object.
Reference 2006-06-28
NSSpecifierTest Class Reference (HTML) (PDF)
Describes the class used to apply a test to compare a specified object to another object.
Reference 2006-06-28
NSWhoseSpecifier Class Reference (HTML) (PDF)
Describes the class used to specify every object in a container that matches a defined condition.
Reference 2006-06-28
NSAppleEventManager Class Reference (HTML) (PDF)
Describes the class used to work with Apple event handler routines and to suspend and resume event handling.
Reference 2006-05-23
NSAppleScript Additions Reference (HTML) (PDF)
Describes additions to the NSAppleScript class to provide syntax-highlighted script source.
Reference 2006-05-23
NSCloneCommand Class Reference (HTML) (PDF)
Describes the class used to clone a scriptable object or objects.
Reference 2006-05-23
NSComparisonMethods Protocol Reference (HTML) (PDF)
Describes the interface for default comparison methods in the NSSpecifierTest class.
Reference 2006-05-23
NSCountCommand Class Reference (HTML) (PDF)
Describes the class used to count the number of objects of a specified class in the specified object container.
Reference 2006-05-23
NSCreateCommand Class Reference (HTML) (PDF)
Describes the class used to create a specified scriptable object.
Reference 2006-05-23
NSDeleteCommand Class Reference (HTML) (PDF)
Describes the class used to delete a specified scriptable object or objects.
Reference 2006-05-23
NSExistsCommand Class Reference (HTML) (PDF)
Describes the class used to determine whether a specified scriptable object exists.
Reference 2006-05-23
NSGetCommand Class Reference (HTML) (PDF)
Describes the class used to get the specified value or object from the specified scriptable object.
Reference 2006-05-23
NSLogicalTest Class Reference (HTML) (PDF)
Describes the class used to perform logical operations in determining the scriptable objects a command acts on.
Reference 2006-05-23
NSMiddleSpecifier Class Reference (HTML) (PDF)
Describes the class used to specify the middle object in a collection.
Reference 2006-05-23
NSMoveCommand Class Reference (HTML) (PDF)
Describes the class used to move the specified scriptable object or objects.
Reference 2006-05-23
NSNameSpecifier Class Reference (HTML) (PDF)
Describes the class used to specify an object in a collection (or container) by name.
Reference 2006-05-23
NSPropertySpecifier Class Reference (HTML) (PDF)
Describes the class used to specify a simple attribute value, a one-to-one relationship, or all elements of a to-many relationship.
Reference 2006-05-23
NSQuitCommand Class Reference (HTML) (PDF)
Describes the class used to quit the specified application.
Reference 2006-05-23
NSRandomSpecifier Class Reference (HTML) (PDF)
Describes the class used to specify an arbitrary object in a collection.
Reference 2006-05-23
NSRangeSpecifier Class Reference (HTML) (PDF)
Describes the class used to specify a range of objects in a container through two delimiting objects.
Reference 2006-05-23
NSScriptCoercionHandler Class Reference (HTML) (PDF)
Describes the class that provides a mechanism for converting one kind of scripting data to another.
Reference 2006-05-23
NSScriptExecutionContext Class Reference (HTML) (PDF)
Describes the class that provides a shared instance of the context in which the current script command is executed.
Reference 2006-05-23
NSScriptingComparisonMethods Protocol Reference (HTML) (PDF)
Describes the informal protocol used to define a set of methods for comparing script objects.
Reference 2006-05-23
NSScriptObjectSpecifiers Protocol Reference (HTML) (PDF)
Describes the informal protocol used by scriptable objects to provide a fully specified object specifier to themselves.
Reference 2006-05-23
NSScriptWhoseTest Class Reference (HTML) (PDF)
Describes the abstract class used to represent expressions for testing scriptable object inclusion.
Reference 2006-05-23
NSSetCommand Class Reference (HTML) (PDF)
Describes the class used to set values in a scriptable object.
Reference 2006-05-23
NSUniqueIDSpecifier Class Reference (HTML) (PDF)
Describes the class used to specify an object in a container by unique ID.
Reference 2006-05-23
NSWindowScripting Protocol Reference (HTML) (PDF)
Describes the category on NSWindow for scripting basic properties and commands of windows in scriptable applications.
Reference 2006-05-23
Using PyObjC for Developing Cocoa Applications with Python (HTML)
Learn how to build a sample Cocoa app using the Cocoa-Python bridge PyOjbC.
Articles 2005-08-15
Sketch-112 (HTML) (DMG) (ZIP)
Sketch is a Scriptable Graphics application. This sample adds certain Scriptable functionality to Sketch, as an example for use in WWDC 2005 Session 112.
Sample Code 2005-06-06
ScriptView (HTML) (DMG) (ZIP)
Shows how to build a script editor application with a built-in script database using AppleScript Studio.
Sample Code 2005-06-01
XML-RPC and SOAP Programming Guide (HTML) (PDF)
Explains how to make remote procedure calls from applications or from AppleScript scripts.
Guides 2005-03-03
Cocoa and AppleScript: From Top to Bottom (HTML)
Learn how to activate AppleScript in your application so that users can create scripts.
Articles 2004-08-23
Scripting Interface Guidelines (HTML)
TN2106: Directions for providing a clean and consistent scripting interface for your application.
Technical Notes 2004-03-01
The Enhanced Print Apple Event (HTML)
TN2082: Describes an enhancement to the print Apple event that gives developers more control over scripted printing.
Technical Notes 2003-12-09
DeskPictAppDockMenu (HTML) (DMG) (ZIP)
How to add a dynamic Dock menu to your Cocoa application
Sample Code 2003-01-14
Calling an AppleScript and providing parameters from an Application (HTML) (日本語 HTML)
QA1111: Explains calling and providing parameter values to an AppleScript event handler from an application written in C.
Technical Q&As 2002-03-13
Calling AppleScript from an Application (HTML)
QA1026: Describes how to call an AppleScript from an application written in C.
Technical Q&As 2001-04-10