[X4U] Applescript to remove spare drive
Scott
scott-xlists at scotist.com
Thu Jul 7 15:52:32 PDT 2005
On Jul 7, 2005, at 8:50 AM, Bill White wrote:
> On 7/7/05 11:36 AM, Simon Forster <simon-lists at ldml.com> wrote:
>
>
>>> try
>>> tell application "Finder" to eject "Spare"
>>> end try
>>>
>>
>> The second one should be:
>>
>> tell application "Finder" to eject disk "Spare"
>>
>
> Actually, both "eject" or "eject disk" work fine, as long as the
> disk is
> mounted. Both of these work fine for me running 10.4.1.
>
> -- Bill
Throw in an on error clause. Then maybe it will tell you what the
problem is.
tell application "Finder"
try
eject disk "spare"
on error errText
display alert errText
end try
end tell
If it says "finder can't get disk 'spare'", try adding a short delay
before the eject disk clause. "delay n" will pause for n seconds.
--
Scott
More information about the X4U
mailing list