Re:Unmounting a Server Disk
Re:Unmounting a Server Disk
- Subject: Re:Unmounting a Server Disk
- From: Net <email@hidden>
- Date: Thu, 19 Jul 2001 08:11:38 +0200
- Organization: Marine
Hello,
-----------------------------------------------------------------
Eric Sackett wratten,
I'm trying to unmount a disk in the Finder by AppleScript. The only way
I
see is to use the "put away" command. I'm using Mac OS 9.1 and AS 1.6.
So I have:
tell application "Finder"
if (exists disk "Shared") then
put away disk "Shared" without asking
end if
end tell
This works great when run from Script Editor, but when run from OSA Menu
as
a compiled script, I get an error that the AppleEvent timed out. Once I
dismiss the dialog, the disk is removed from the desktop.
Any ideas? TIA.
-----------------------------------------------------------------
You can make your script in "try" statment, like this :
[Script]
tell application "Finder"
try
if (exists disk "Shared") then put away disk "Shared" without
asking
on error
return
end try
end tell
[/Script]
Fredo d;o)