beautypg.com

Apple AppleScript Finder Guide User Manual

Page 109

background image

C H A P T E R 2

Finder Objects

Object Class Definitions

97

COMMANDS HANDLED

Clean Up, Close, Count, Data Size, Exists, Get, Open, Print, Sort, Update

DEFAULT VALUE CLASS RETURNED

Reference.

EXAMPLE

This script closes all Finder windows. It has the same effect as holding down

the Option key and clicking the close box of the front window.

tell application "Finder"

close windows

end tell

For an example of a script that either takes a snapshot of the current window

arrangement or restores a previously stored snapshot, see Listing 1-2 on

page 11.

NOTES

In addition to the properties listed here, a Finder window can inherit certain

properties, such as Name, from the object to which it belongs.

tell application "Finder"

name of front window

end tell

--result: "My World"