• 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: Unwanted dialog if mounting fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unwanted dialog if mounting fails


  • Subject: Re: Unwanted dialog if mounting fails
  • From: Yvan KOENIG <email@hidden>
  • Date: Tue, 28 Jul 2009 11:32:41 +0200


Le 27 juil. 2009 à 12:41, Bert Groeneveld a écrit :

Example script:

try
mount volume "afp://name:email@hidden/Macintox HD"
on error
set ErrMsg to "Unable to mount volume."
sendErrorMessage(ErrMsg) -- this calls a handler and is of no further interest here.
end try


Hi, at the beginning of a script, I want to mount a volume of a server.
The volume "Macintox HD" does not exist. Despite the fact that I put my code in a try block I still get a dialog that tells me that mounting failed. This seems strange to me since the code is inside a try block. Can I work around this dialog? I mean, I just want to execute the code in the error block, without any popus that require user-interaction.

I don't use networks so I can't test. I assume that you may use something like

if exists volume xx then mount volume xx

Yvan KOENIG (from FRANCE mardi 28 juillet 2009 11:32:35)



_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Unwanted dialog if mounting fails
      • From: Peter Baxter <email@hidden>
    • Re: Unwanted dialog if mounting fails
      • From: Bert Groeneveld <email@hidden>
References: 
 >Unwanted dialog if mounting fails (From: Bert Groeneveld <email@hidden>)

  • Prev by Date: In a handler passed as a parameter to a handler in another script, how do I refer to top-level variables from the original script?
  • Next by Date: Re: Unwanted dialog if mounting fails
  • Previous by thread: Re: Unwanted dialog if mounting fails
  • Next by thread: Re: Unwanted dialog if mounting fails
  • Index(es):
    • Date
    • Thread