I want a script which removes any mounted image (like dmg files or iso files) but not CD/DVD drive or USB drive.
I wrote this:
tell application "Finder"
eject (every disk whose ejectable is true or local volume is false)
end tell
The script above removes my USB drives.
Secondly, It works fine when run from Script Editor but takes a lot of time when run using a hotkey from Butler or Quicksilver. Any idea as to why this happens?