try to eject an used ipod without finder error?
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.