O'Reilly logo

AppleScript® Programming for the Absolute Beginner by Jerry Lee Ford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Storing Data in Records

Another way of managing data in your AppleScript is to use records. A record is an unordered collection of data stored in key-value pairs, where individual pieces of data are assigned a unique key and stored as values. Records can be used to store any type of data supported by AppleScript. Many AppleScript commands and scriptable applications return data as records.

Hint

A record is AppleScript’s equivalent to a hash or dictionary in other programming languages.

Records have a very specific format, as shown here:

{Keyl: Value, Key2: Value...}

Key1 represents the key for the first value stored in the records and Value represents ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required