beautypg.com

Apple AppleScript Finder Guide User Manual

Page 49

background image

C H A P T E R 2

Finder Objects

Object Class Definitions

37

DEFAULT VALUE CLASS RETURNED

Reference.

EXAMPLES

This script turns on the Calculate Folder Sizes property of the Views

control panel:

tell application "Finder"

set calculate folder sizes of view preferences to true

end tell

This script turns on file sharing for the local computer.

tell application "Finder"

set file sharing to true

end tell

The next example selects all the unselected items in the active window.

tell application "Finder"

repeat with x in front window

set selected of x to not selected of x

end repeat

end tell

NOTES

Although Startup Disk and Trash are properties of the desktop object, you can

also refer to them as if they were properties of the Finder. Thus, the Finder

interprets both of these statements are references to whatever disk is currently

the startup disk:

startup disk
startup disk of desktop