beautypg.com

Apple AppleScript Finder Guide User Manual

Page 144

background image

C H A P T E R 3

Finder Commands

132

Command Definitions

Select

3

The Select command is a request to select one or more objects. If you specify

objects in several containers, only the objects in the last specified container

will remain selected. The container must be open for the specified object to

be selected.

SYNTAX

select

referenceToObject

PARAMETER

referenceToObject

A reference to the object or objects to be selected.

Class:

Reference or list of references

RESULT

Reference to the selected object or a list of references.

EXAMPLE

This script selects two files in a single folder:

tell application "Finder"

select {file "To Tom" in folder "Letters" of startup disk, ¬

file "To Lorraine" in folder "Letters" of startup disk}

end tell

The folder must be open for the script to work correctly.