beautypg.com

Apple AppleScript Finder Guide User Manual

Page 66

background image

C H A P T E R 2

Finder Objects

54

Object Class Definitions

ELEMENT CLASSES

None

COMMANDS HANDLED

Clean Up, Close, Copy, Count, Data Size, Delete, Duplicate, Exists, Get, Move,

Open, Put Away, Reveal, Select, Sort, Update

DEFAULT VALUE CLASS RETURNED

Reference to a file or, if you use the plural form control panels, a list of

references.

EXAMPLES

This script turns on the Snap to Grid property of the Views control panel:

tell application "Finder"

set snap to grid of control panel "Views" of ¬

control panels folder to true

end tell

You can also use the View Preferences property of the Finder application object

as a reference to the Views control panel. For example, this script toggles the

Date Heading property of the Views control panel on and off:

tell application "Finder"

set date heading of view preferences to ¬

not date heading of view preferences

end tell