on EjectDisk(DiskName) try tell application "Finder" eject DiskName end tell end try end EjectDisk
This script almost immediately ejects CD/DVD when invoked from Script Editor. However when I try to launch it from Folder Actions or from Preferences CDs & DVDs pane it takes 10-20 seconds to eject a disk.
What could be the reason for it?
Is there any workaround?