• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
ejecting a mounted disk image under 9 and X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ejecting a mounted disk image under 9 and X


  • Subject: ejecting a mounted disk image under 9 and X
  • From: Craig Knelsen <email@hidden>
  • Date: Tue, 30 Nov 2004 10:46:05 -0600

I want to eject a disk image (mounted from an .smi) that works for both OS 9 and X. The following script works under OS X but does nothing under OS 9 (well, the image icon on the desktop seems to blink once):

property imageVolume : "Internet Exploder 5.1.7:"

on run
ejectVolume(imageVolume)
end run

on ejectVolume(anImageVolume)
tell application "Finder"
try
eject (anImageVolume as alias)
on error errorMsg number errNum
--if errNum is not -43 then (* -43 is file not found *)
tell me to display dialog "Unable to unmount image volume " & anImageVolume & ¬
return & errorMsg & " (" & errNum & ")" buttons {"OK"} ¬
with icon stop default button 1
--end if
end try
end tell
end ejectVolume

If I replace "eject" with "put away" or "delete", this works under OS 9 but NOT under OS X. "put away" no longer seems to be supported under OS X Finder. If I try "delete", the Finder pops up a dialog stating it is going to move the item to the trash but this fails and actually crashes the Finder (it seems to restart the Finder anyways). I would prefer not to have to check the OS version and use "eject" for OS X and "put way" for OS 9. Is there a way I can do this without resorting to an OS version check?
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: set variables, in mass
  • Next by Date: Re: set variables, in mass
  • Previous by thread: Re: set variables, in mass
  • Next by thread: RE: Accessing the Desktop & directory path specifications
  • Index(es):
    • Date
    • Thread