DekGenius.com
Team LiB   Previous Section   Next Section
name

Syntax

get folder named "today" -- gets folder object by its name property

Description

When you use the common AppleScript parlance of:

tell app ApplicationName

you actually use the name reference form. You can use either form of specifying an object by its name property:

tell app named "Sherlock 2"

or:

tell app "Sherlock 2"

Scripters often reference files, folders, and disks by their name property, if they know the name. There is a difference, however, between getting an object's name and getting an object by name, as these examples indicate.

Examples

get folder "today" (* returns a folder object using the name reference form; 
could also write 'get folder named "today"' *)

get name of folder "today" -- returns a string, "today"
    Team LiB   Previous Section   Next Section