• 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: catching errors on "with administrator privileges"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: catching errors on "with administrator privileges"


  • Subject: Re: catching errors on "with administrator privileges"
  • From: deivy petrescu <email@hidden>
  • Date: Wed, 21 Jun 2006 10:24:25 -0400


On Jun 21, 2006, at 9:30, Jeremy Matthews wrote:

I know you can say "on error -128..." (Thanks Kai) when someone cancels an authentication (to perform a specific action), but how do you catch FAILED authentication errors?

What's the syntax there?

Thanks,
jeremy


Use this script:

<script>
try
	do shell script "ls " with administrator privileges
on error number e
	display dialog e
	return e
end try
</script>

enter the wrong password and get the error number:
-->   -60005
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: catching errors on "with administrator privileges"
      • From: kai <email@hidden>
    • Re: catching errors on "with administrator privileges"
      • From: Emmanuel <email@hidden>
References: 
 >catching errors on "with administrator privileges" (From: Jeremy Matthews <email@hidden>)

  • Prev by Date: catching errors on "with administrator privileges"
  • Next by Date: Scripting Finder window column widths
  • Previous by thread: catching errors on "with administrator privileges"
  • Next by thread: Re: catching errors on "with administrator privileges"
  • Index(es):
    • Date
    • Thread