# AppleScript Utilities and Applications

Apple provides a number of utilities and applications in OS X to enhance the features of AppleScript and your scripts. You can get additional information on some items described in this section by searching in Mac Help in the Finder or by going to theAppleScriptwebsite.

## AppleScript Utility
AppleScript Utility, located in/Applications/AppleScript, is an application that first became available in OS X version 10.4. Starting in OS X version 10.5, this utility is itself scriptable.
AppleScript Utility helps you manage several AppleScript-related features in OS X that were formerly available separately. For example, AppleScript Utility provides an interface to:
- Select a default script editor (to be launched when you double-click a script file.
Select a default script editor (to be launched when you double-click a script file.
- Enable or disable GUI scripting (described inSystem Events and GUI Scripting).Prior to OS X v10.4, GUI scripting was enabled through the âEnable access for assistive devicesâ checkbox in the Universal Access preference pane in System Preferences.
Enable or disable GUI scripting (described inSystem Events and GUI Scripting).
Prior to OS X v10.4, GUI scripting was enabled through the âEnable access for assistive devicesâ checkbox in the Universal Access preference pane in System Preferences.
- Launch the Folder Actions Setup application (described inFolder Actions Setup).
Launch the Folder Actions Setup application (described inFolder Actions Setup).
- Specify settings for the Script menu.The Script menu provides access to scripts for performing tasks such as the following:Opening AppleScript related folders.Working with Apple applications such as Address Book, Mail, and Script Editor.Working with parts of the OS, such as ColorSync, Finder, and Folder Actions.Working with features such as internet services, printing, and URLs.In OS X version 10.3, you install and remove the Script menu with utility applications located in/Applications/AppleScript.
Specify settings for the Script menu.
The Script menu provides access to scripts for performing tasks such as the following:
- Opening AppleScript related folders.
Opening AppleScript related folders.
- Working with Apple applications such as Address Book, Mail, and Script Editor.
Working with Apple applications such as Address Book, Mail, and Script Editor.
- Working with parts of the OS, such as ColorSync, Finder, and Folder Actions.
Working with parts of the OS, such as ColorSync, Finder, and Folder Actions.
- Working with features such as internet services, printing, and URLs.
Working with features such as internet services, printing, and URLs.
In OS X version 10.3, you install and remove the Script menu with utility applications located in/Applications/AppleScript.

## Folder Actions Setup
Folder Actions is a feature that lets you associate scripts with folders. A script is executed when the folder to which it is attached is opened or closed, moved or resized, or has items added or removed.
Folder Actions Setup, located in/Applications/AppleScript, is an application that first became available in OS X version 10.3. Starting in OS X version 10.5, Folder Actions Setup is itself scriptable.
This utility helps you perform tasks related to Folder Actions, including the following:
- Enable or disable Folder Actions.
Enable or disable Folder Actions.
- View the folders that currently have scripts attached and view the attached scripts.
View the folders that currently have scripts attached and view the attached scripts.
- Add folders to or remove folders from the list of folders.
Add folders to or remove folders from the list of folders.
- Attach one or more scripts to a folder.
Attach one or more scripts to a folder.
- Remove attached scripts from a folder.
Remove attached scripts from a folder.
- Enable or disable scripts attached to a folder.
Enable or disable scripts attached to a folder.

## System Events and GUI Scripting
System Events is an agent (or faceless background application) that supplies the terminology for using a number of features in AppleScript scripts. Among these features is GUI scripting, which allows your scripts to perform some actions in applications that have no built-in scripting support. System Events, which is located in/System/Library/CoreServices, has been part of OS X since version 10.1 (Puma), though its features have evolved since that release.
The following are some of the terminology suites supplied by System Events in OS X version 10.4 (and where noted, in version 10.5). For more information, display the application dictionary, as described inDisplaying Scripting Dictionaries. You can also get information on many of the features supported by System Events in Mac Help (from the Help menu in OS X) and at the AppleScriptGUI Scriptingweb page at theAppleScript in OS Xwebsite.
- Accounts suite and Login Items suiteSystem Events supports scripting of the System Preferences Accounts pane through the terminology in these two suites.
Accounts suite and Login Items suite
System Events supports scripting of the System Preferences Accounts pane through the terminology in these two suites.
- Audio File suite and Movie File suiteAvailable starting in OS X version 10.5, these suites provide terminology for accessing audio files and movie files, and the data they contain.
Audio File suite and Movie File suite
Available starting in OS X version 10.5, these suites provide terminology for accessing audio files and movie files, and the data they contain.
- Desktop suiteAvailable starting in OS X version 10.5, this suite provides access to Desktop preferences, such as the current desktop picture or pictures folder, and the interval for changing the desktop picture.
Desktop suite
Available starting in OS X version 10.5, this suite provides access to Desktop preferences, such as the current desktop picture or pictures folder, and the interval for changing the desktop picture.
- Disk-Folder-File suiteProvides terminology to access disks, files, and folders without targeting the Finder. This can be more efficient than using the Finder, and can prevent certain kinds of conflicts.
Disk-Folder-File suite
Provides terminology to access disks, files, and folders without targeting the Finder. This can be more efficient than using the Finder, and can prevent certain kinds of conflicts.
- Dock Preferences suite and Expose Preferences suiteAvailable starting in OS X version 10.5, these suites provide terminology for accessing Dock preferences, as well as ExposÃ© (including Spaces) and Dashboard mouse and key preferences.
Dock Preferences suite and Expose Preferences suite
Available starting in OS X version 10.5, these suites provide terminology for accessing Dock preferences, as well as ExposÃ© (including Spaces) and Dashboard mouse and key preferences.
- Folder Actions suiteStarting with AppleScript 1.9.0 in Mac OS  version 10.2, System Events supports the Folder Actions feature, described inFolder Actions Setup.
Folder Actions suite
Starting with AppleScript 1.9.0 in Mac OS  version 10.2, System Events supports the Folder Actions feature, described inFolder Actions Setup.
- Network Preferences suiteAvailable starting in OS X version 10.5, this suite provides terminology for working with items such as connections and disconnections, network locations, and network services.
Network Preferences suite
Available starting in OS X version 10.5, this suite provides terminology for working with items such as connections and disconnections, network locations, and network services.
- Power suiteProvides commands for sleeping, logging out, shutting down, or restarting your computer.
Power suite
Provides commands for sleeping, logging out, shutting down, or restarting your computer.
- Property List suiteProvides terminology for reading and writing the information in property list files.
Property List suite
Provides terminology for reading and writing the information in property list files.
- Processes suiteProvides classes and commands for GUI Scripting, a feature available starting in OS X version 10.3 that allows scripters to control applications that are either not scriptable or only partially scriptable. With GUI Scripting, AppleScript scripts can select menu items, push buttons, and perform other tasks to control the interfaces of most non-Classic applications. However, as the name implies, GUI scripting works by scripting the user interface, and so tends to result in fragile scripts. For example, items in an applicationâs user interface may change in various ways between releases, or even between launches of the application, depending on preference settings and other factors.This suite is called the Processes suite because in GUI scripting, the root for any script must be a process (represented by an instance of theapplication process class). The GUI Scripting architecture is based on the accessibility support in OS X, which must be enabled, in OS X v10.4, through the AppleScript Utility. Prior to OS X v10.4, GUI scripting was enabled through the âEnable access for assistive devicesâ checkbox in the Universal Access preference pane in System Preferences.For more information, see theGUI Scriptingweb page.
Processes suite
Provides classes and commands for GUI Scripting, a feature available starting in OS X version 10.3 that allows scripters to control applications that are either not scriptable or only partially scriptable. With GUI Scripting, AppleScript scripts can select menu items, push buttons, and perform other tasks to control the interfaces of most non-Classic applications. However, as the name implies, GUI scripting works by scripting the user interface, and so tends to result in fragile scripts. For example, items in an applicationâs user interface may change in various ways between releases, or even between launches of the application, depending on preference settings and other factors.
This suite is called the Processes suite because in GUI scripting, the root for any script must be a process (represented by an instance of theapplication process class). The GUI Scripting architecture is based on the accessibility support in OS X, which must be enabled, in OS X v10.4, through the AppleScript Utility. Prior to OS X v10.4, GUI scripting was enabled through the âEnable access for assistive devicesâ checkbox in the Universal Access preference pane in System Preferences.
For more information, see theGUI Scriptingweb page.
- QuickTime File suiteAvailable starting in OS X version 10.5, this suite provides terminology for working with QuickTime files, including data, annotations, and tracks.
QuickTime File suite
Available starting in OS X version 10.5, this suite provides terminology for working with QuickTime files, including data, annotations, and tracks.
- Security suiteAvailable starting in OS X version 10.5, this suite provides access to Security preferences, such as automatic login and password requirements.
Security suite
Available starting in OS X version 10.5, this suite provides access to Security preferences, such as automatic login and password requirements.
- System Events suiteThis suite provides a great deal of terminology for working with parts of the OS. That includes properties for accessing certain folders (preferences folder, favorites folder, desktop pictures folder, and so on), the startup disk, and other useful items.
System Events suite
This suite provides a great deal of terminology for working with parts of the OS. That includes properties for accessing certain folders (preferences folder, favorites folder, desktop pictures folder, and so on), the startup disk, and other useful items.
- XML suiteProvides terminology for working with information in XML files.
XML suite
Provides terminology for working with information in XML files.

## Image Events
Like System Events, Image Events is an agent (or faceless background application) that is located in/System/Library/CoreServices. Image Events supports the manipulation, from scripts, of images and image-related data through operations such as cropping, embedding, matching, padding, profiling, rotating, and scaling. These operations are typically used in print, web, and media publishing.
Image Events has been part of OS X since version 10.4 and provides access to the built-in service called SIPS (Scriptable Image Processing Server) that became available in that OS release.
You can find more information on Image Events in Mac Help (from the OS X Help menu) or at theImage Eventsweb page. You can also examine the Image Events dictionary with Script Editor, as described inDisplaying Scripting Dictionaries. SIPS is described inTechnical Note TN2035 ColorSync on OS X. You can also get some information about SIPS by typingsips --helpin a Terminal window.

## Database Events
Database Events is a simple, scratchpad database implementation for use in AppleScript scripts. It allows any script applet to create and edit its own database.
You can use Database Events to create a new database with a file associated with it or to open a database file to access its database. Databases contain records, records contain fields, and fields contain a name and a value. The assignment of names and values is free form, as the scripter defines it. Databases persist in the file system, across executions of Database Events.
Database Events has been part of OS X since version 10.4. Like System Events, Database Events is an agent (or faceless background application) that is located in/System/Library/CoreServices.
You can examine the Database Events dictionary with Script Editor, as described inDisplaying Scripting Dictionaries.
Copyright © 2002, 2007 Apple Inc. All Rights Reserved.Terms of Use|Privacy Policy|  Updated: 2007-10-31