beautypg.com

Apple AppleScript Finder Guide User Manual

Page 128

background image

C H A P T E R 3

Finder Commands

116

Command Definitions

RESULT

A reference to the ejected disk or a list of references.

EXAMPLE

This script ejects the disk named Untitled:

tell application "Finder" to eject disk "Untitled"

NOTES

If you use the Eject command to eject a disk, the disk’s dimmed icon remains

on the desktop after the disk ejects. To eject a disk without retaining its

dimmed icon, use the Put Away command, which is defined on page 127.

Empty

3

An Empty command is a request to empty the trash. It has the same effect as

choosing Empty Trash from the Special menu, except that it never warns the

user before emptying—even if the Warn Before Emptying property of the Trash

is set to true.

SYNTAX

empty [

referenceToTrash ]

PARAMETERS

referenceToTrash

A reference to a trash container.

Class:

Reference

Default value:

Reference to the local computer’s Trash