• 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: Eric Sackett <email@hidden>
  • Date: Thu, 19 Jul 2001 21:30:44 -0400

Thanks everyone for the info. I was actually writing it to be triggered by
the "iDo Script Scheduler" and was just testing it in the OSA Menu.

As it turns out, it runs fine when triggered by iDo Script Scheduler, it
only seems to hang in OSA Menu. Not sure why.
--
Eric

> From: Nigel Garvey <email@hidden>
> Date: Thu, 19 Jul 2001 23:31:03 +0100
> To: "AppleScript Users" <email@hidden>
> Subject: Re: Unmounting a Server Disk
>
> Eric Sackett wrote on Tue, 17 Jul 2001 17:33:31 -0400:
>
>> 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.
>>
>> It's as if the Finder is waiting for something after it puts away the disk.
>> It doesn't happen, so it times out even though it has already put away the
>> disk.
>>
>> Any ideas? TIA.
>
> Fredo's already suggested putting the script in a 'try' block, but that
> way you still have to wait for the timeout to expire. Another way - if
> you don't mind using a third-party OSAX - is to simulate the Command-"y"
> key-press. This produces an almost instantaneous result:
>
> tell application "Finder"
> activate
> if (exists disk "Shared") then
> select disk "Shared"
> TypeText "y" with Command -- needs Sandi's Additions
> end if
> end tell
>
> I believe that something similar is possible with Akua Sweets. To be
> honest, though, by the time you've selected the script in OSA Menu, you
> may as well select the disk icon and press Command-"y" for real. :-)
>
> NG


  • Follow-Ups:
    • Re: Unmounting a Server Disk
      • From: Jon Pugh <email@hidden>
References: 
 >Re: Unmounting a Server Disk (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Saving info to a newly created text file from within a script
  • Next by Date: Quark Paper Size
  • Previous by thread: Re: Unmounting a Server Disk
  • Next by thread: Re: Unmounting a Server Disk
  • Index(es):
    • Date
    • Thread