Chapter 10. Working with Lists and Records

Two of AppleScript's most powerful and interesting classes are list and record. Unlike simpler objects such as numbers and strings, which represent "flat" data, a list or record object is actually a collection of other AppleScript objects. In this chapter, you will learn how list and record objects are structured and the different types of tasks they can be used for.

Introducing Lists and Records

Before we go into the details, let's begin with a quick introduction to lists and records and compare them to one another.

What Is a List?

In technical terms, a list is an ordered collection of objects. In less technical terms, though, what does that mean? A simple example will help to clarify.

Imagine you are preparing ...

Get Learn AppleScript: The Comprehensive Guide to Scripting and Automation on Mac OS X, Third 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.