• 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: Mounting disk before continuing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mounting disk before continuing


  • Subject: Re: Mounting disk before continuing
  • From: David Graham <email@hidden>
  • Date: Tue, 22 May 2001 12:50:34 -0700

You should mount the volume with Applescript first, then the rest will follow OK.

At 5:20 PM -0500 5/21/01, Darrel Sandall wrote:
>If I may ask a quick question. I am fairly new to Applescript, so
>please bear with me. I have written a script to read as follows.
>The intent of the script is to mount a disk (which requires me typing
>a password into a dialog box. I want to have the script wait for the
>disk to successfully mount before continuing, as the second tell
>statement refers to an Applescript that launches files off of the
>newly mounted disk.
>
>tell application "Finder"
> activate
> select file "blah" of folder "blah blah" of disk "blah"
> open selection
> repeat until disk "blah blah blah" is in (list disks)
> end repeat
>end tell
>tell application "Finder"
> activate
> select file "blah" of folder "blah blah" of disk "blah"
> open selection
> select file "blah" of folder "blah" of folder "blah" of startup disk
> open selection
> close (every container window whose index is not 0)
>end tell
>
>This works properly in bringing up the login box to mount the disk.
>However, it then immediately brings up a dialog box that says,
>"Finder got an error: Can't get disk "blah blah blah"" with only a
>Stop button on the box. I can continue to type in the login for the
>disk and have it mount successfully, but the error box takes the
>focus from the login box, requiring me to click back on the login box
>to type the password. Unfortunately hitting stop on the error box
>then kills the script, so it cannot go on the second tell statement.
>Have I done something not quite right, or is there a better way to
>have the script wait until the disk is successfully mounted to
>continue?
>
>Thanks for any help! I appreciate it.


--


:: dmgraham information solutions ... database, web & more ::

david m graham
10353 san diego mission rd., #107c, san diego, ca 92108
619.322.9698
http://www.dmgraham.n3.net


  • Follow-Ups:
    • Re: Mounting disk before continuing
      • From: Darrel Sandall <email@hidden>
References: 
 >Mounting disk before continuing (From: Darrel Sandall <email@hidden>)

  • Prev by Date: Re: Select None in the Finder
  • Next by Date: Installer Observer Substitute, or an applescript workaround
  • Previous by thread: Mounting disk before continuing
  • Next by thread: Re: Mounting disk before continuing
  • Index(es):
    • Date
    • Thread