This section is dedicated to the scripting of the Mac’s control panels and extensions, which are located in the Control Panels and Extensions folders of the System Folder. Each chapter describes the purpose of this system software, then includes a reference to their dictionary commands and classes. Some of the more exciting new scriptable technologies are included in this section, including Apple Data Detectors, Folder Actions, and the Speech-related extensions in Chapter 30.

This scriptable control panel lets you use AppleScript to set and change the visual and audible aspects of your computer, such as its background color, the font for desktop text, and how window title bars and scroll bars work. We show you how to do this and include a detailed reference to this software’s commands and classes.

This chapter describes a powerful scripting technology by which you can assign an AppleScript to be triggered based on certain information that a user selects inside of a contextual menu, such as an email or web address. Apple Data Detectors Extension describes the Apple Data Detectors scripting-addition class and commands in reference form.

This chapter describes how to use AppleScript to automate various menu items (e.g., Recent applications, documents, and servers) in the Apple menu (the drop-down menu in the upper-left part of the computer screen).

The Application Switcher is the floating palette that the user can “tear” off of the Application menu (on the upper-right part of the computer screen). This chapter describes how to set various Switcher elements (e.g., its size, position, button order) with AppleScript and includes a reference to its extensive application class.

ColorSync Extension describes the AppleScript commands and classes for this built-in Macintosh software, which helps synchronize color-matching between the devices that create an image (e.g., scanners) and printers.

This chapter describes the File Exchange commands that you can use to create new extension mappings (i.e., a way to tell the Macintosh how to handle files with certain extensions like .html ), for instance, or view the existing file-type mappings on a machine.

This chapter first summarizes file sharing on the Macintosh, which establishes the level of access network users have to a machine’s disks and folders. Then it shows how to create new users or groups (or delete miscreants) with code examples and a reference section on File Sharing’s dictionary commands and classes.

Folder actions are AppleScripts that are triggered when items are added to or removed from a folder. Folder action commands constitute the Folder Actions suite of the Standard Additions osax and the dictionary commands that derive from the Folder Actions extension. This chapter describes both sets of commands.

This chapter describes the dictionaries for the FontSync control panel and extension. They are used to synchronize the fonts between devices during image production and printing.

This chapter shows how you can use AppleScript to switch between the various computer and networking configurations that are displayed by the Location Manager control panel.

This chapter describes the dictionary commands and classes for both the Memory and Mouse control panels. For example, the chapter shows how you can use an applet to find out about the computer’s virtual-memory settings or disk-cache size.

This chapter describes the different ways that you can integrate speech into your scripts, such as the listen for and say AppleScript commands. Speech listener is actually an application that is located in the Scripting Additions folder of the System Folder, but it will not work unless the Speech Recognition extension is installed and enabled.

This chapter describes the functionality of the Web Sharing control panel and also gives an example of how to use AppleScript with a Common Gateway Interface (CGI) script. CGI scripts execute in response to web page requests, in order to process the incoming data from a form a web user has filled out, for instance. The Web Sharing control panel can be used to allow a computer to perform as a light-weight web server.

Get AppleScript in a Nutshell 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.