Properties and Values

Disks, files, folders, alias files, document files, application files, clippings, font suitcases, packages, internet location files, application files, windows and Finder windows are all objects or “elements” belonging to the Finder application. They are the items the Finder application uses in its organization and display of information. Each of these items has properties that define or describe the particular item. Some of these properties are unique to each item, some of these properties are shared by all Finder items.

For example, while an Internet location file or “link,” is the only Finder element that has a property describing a location on the Internet, it still shares some properties common to all Finder elements such as its icon size or its position in a folder window or on the desktop. And like other Finder elements, such as a folder or document file, a link file has a name property whose value is text displayed with its icon and can be edited by the user of the computer.

An Internet Location file is a file that, when opened, displays its target URL in the default browser window.

An important rule to remember about scriptable objects is this:

Every scriptable application contains elements or objects that have properties. These properties have values that can be read or manipulated.

This rule applies to the Finder application and to all scriptable applications as well. All elements of the Finder application have properties, such as their name, size, and location. All of these properties have values, some of which can be edited, some which can only be read.

Think Big… Start Small

Your exploration of AppleScript is about learning the fundamental principles of the AppleScript language and how to apply them in writing scripts. No matter how complex a script is, the fundamental principles applied within the script remain the same. The lessons learned in scripting a common object such as a Finder window, pertain to all scriptable objects and applications, and can be used to create more complex and powerful automation tools later.

You’ll begin the process of becoming a Scripter by examining the properties of a Finder window and learn how to manipulate them with scripts.

TOP | CONTINUE