Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Finder Guide /
Chapter 3 - Finder Commands / Command Definitions


Eject

An Eject command is a request to eject a disk.

SYNTAX
eject [ referenceToDisk ]
PARAMETERS
referenceToDisk
A reference to the disk to be ejected or a list of references.
Class: Reference or list of references
Default value: List of references to all mounted disks whose Ejectable property is true
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 129.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996