Previous Book Contents Book Index Next

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


An Eject command is a request to eject a disk.

eject [ 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
A reference to the ejected disk or a list of references.

This script ejects the disk named Untitled:

tell application "Finder" to eject disk "Untitled"
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