• 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: call handler with authentication
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: call handler with authentication


  • Subject: Re: call handler with authentication
  • From: kai <email@hidden>
  • Date: Wed, 31 May 2006 17:45:30 +0100


On 31 May 2006, at 16:01, Jeremy Matthews wrote:

I have a handler that I'd like to prompt for authentication....but it refuses to accept this syntax after a handler:

property runasroot: true
------
if runasroot then
	my superstart() with administrator priveleges
else
	my superstart()
end if
------

Ideas?

I'm assuming your superstart handler will run a shell script, Jeremy - since 'administrator privileges' is actually a parameter of Standard Additions' do shell script command. If so, you might do better to use the Boolean value of the runasroot property within the handler itself - perhaps something like this:


---------

property runasroot : true

on superstart() (* dummy code *)
do shell script "echo Shell script executed." administrator privileges runasroot
display dialog result buttons {"OK"} default button 1
end superstart


superstart()

---------

---
kai


_______________________________________________ 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
References: 
 >call handler with authentication (From: Jeremy Matthews <email@hidden>)

  • Prev by Date: call handler with authentication
  • Next by Date: posix path argument
  • Previous by thread: call handler with authentication
  • Next by thread: posix path argument
  • Index(es):
    • Date
    • Thread