beautypg.com

Apple AppleScript Finder Guide User Manual

Page 129

background image

C H A P T E R 3

Finder Commands

Command Definitions

117

RESULT

A reference to the trash container that was emptied.

EXAMPLE

tell application "Finder" to empty the trash

Erase

3

The Erase command is a request to erase one or more disks. It is equivalent to

selecting one or more disk icons on the desktop and choosing Erase Disk from

the Special menu. Before the specified disk is erased, a dialog box appears

asking the user to confirm that formatting should proceed.

SYNTAX

erase

referenceToDisk

PARAMETERS

referenceToDisk

A reference to the disk to be erased or a list of references.

Class:

Reference or list of references.

RESULT

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

EXAMPLE

tell application "Finder" to erase disk "Untitled"