• 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
Re:Unmounting a Server Disk
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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)


  • Prev by Date: Re: Timeout not working
  • Next by Date: writing multiple files
  • Previous by thread: Unmounting a Server Disk
  • Next by thread: Re: Unmounting a Server Disk
  • Index(es):
    • Date
    • Thread