beautypg.com

Apple AppleScript Finder Guide User Manual

Page 145

background image

C H A P T E R 3

Finder Commands

Command Definitions

133

Set

3

The Set command is a request to set the values of one or more objects. The

Finder version of the Set command is identical to the standard version

described in the AppleScript Language Guide.

SYNTAX

set

referenceToObject to expression

PARAMETERS

referenceToObject

A reference to the object whose value is to be set or a list

of references.

Class:

Reference or list of references

expression

The expression whose value or values are to be assigned.

If expression is a reference or a list of references, they must

be references for which the Finder can obtain a value.

Class:

Any appropriate class for the objects whose values are

to be set.

RESULT

The value assigned or a list of values.

EXAMPLE

This script sets the name and position of the selection:

tell application "Finder"

set name of selection to "My Folder"
set position of selection to {140, 160}

end tell