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

Mounting disk before continuing


  • Subject: Mounting disk before continuing
  • From: Darrel Sandall <email@hidden>
  • Date: Mon, 21 May 2001 17:20:17 -0500

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.

Darrel


  • Follow-Ups:
    • Re: Mounting disk before continuing
      • From: Paul Skinner <email@hidden>
    • Re: Mounting disk before continuing
      • From: David Graham <email@hidden>
  • Prev by Date: Re: Scope of globals, parents and children, "load script" an
  • Next by Date: Duplicating boxes in Quark
  • Previous by thread: Font Suitcasing
  • Next by thread: Re: Mounting disk before continuing
  • Index(es):
    • Date
    • Thread