beautypg.com

Apple AppleScript Finder Guide User Manual

Page 134

background image

C H A P T E R 3

Finder Commands

122

Command Definitions

propertyValue

The value to assign to the property.

Class:

The value class of the property as specified in the object

class definition in Chapter 2, “Finder Objects,” or a value that

can be coerced to the class of the property

Default value:

If you create a file or folder without specifying

its name, the Finder creates a an item named Untitled File or

Untitled Folder. Other property values, such as the creation

date, icon, and so on, are provided by the Finder on the basis

of information in the operating environment.

referenceToObject

A reference to the object or objects to which you want to make

an alias. This parameter is meaningful only if you are making

a new alias.

Class:

Reference or list of references to the object or objects for

which aliases are to be made

Default value:

None

RESULT

A reference to the newly created object.

EXAMPLES

The script that follows creates a new folder named My Folder at the top level of

the startup disk.

tell application "Finder"

make new folder at startup disk with properties ¬

{name: "My Folder"}

end tell

If you save this script as an application, it makes an alias file on the desktop for

any objects whose icon you drop onto the script’s icon.

on open x

repeat with i in x

tell application "Finder"

make alias file to i

end tell

end repeat

end open