• 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
try to eject an used ipod without finder error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

try to eject an used ipod without finder error?


  • Subject: try to eject an used ipod without finder error?
  • From: email@hidden
  • Date: Sat, 13 Mar 2004 22:03:40 +1100

hi there

try to write a script on mac os 10.3 which ejects my iPod or if the iPod is currently in use (itunes update!) it waits until the iPod is not in use anymore and than ejects it.

well, it was easy to write a first version which quintessentially issues the following lines

tell application "Finder"
eject ipod
end tell

where ipod is a reference to the iPod disk.

in case of a failure i get an error dialog: `The Disk "Leos IPod" is in use and could not be ejected.' i thought, that's ok; in order to avoid the dialog i just use an error catcher:

tell application "Finder"
try
eject ipod
on error
-- set a retry flag here
end try
end tell

unfortunately this does not work: the error dialog doesn't seem to be a applescript thing then rather a message finder displays.

so how can i tell finder not to show this dialog and in best case to return somehow the success of the eject command?

or is there an easy/native way to find out wether a disk is in use or not?

thanks, leo
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: "Save changes to script" when it terminates?
  • Next by Date: curiosity with do shell script
  • Previous by thread: Re: Funny Character/Unicode Support
  • Next by thread: curiosity with do shell script
  • Index(es):
    • Date
    • Thread