I've got another question about using this. Hope you don't mind.

Is there anyway to suppress the dialog if it has already displayed once in a session? I realize there's a timeout thing with sudo that eventually expires (my Unix knowledge is limited), and at that point a new dialog would have to appear anyway.

But here's my situation. I have a Rev script that performs a few different tasks in one swipe, some of which require admin privileges on the system. They involve changing a certain file's permissions, editing the file, then changing the permissions back. But it seems that every time the command changes, even if it's simply "chmod 750" to "chmod 755", a dialog comes up again. So I'm ending up with 2 or 3 dialogs right in a row. Any way to keep this from happening? Is there some way to extract the user name and password and then pass those like in your second example? That's probably not a very kosher thing to do, though.

Thanks,
Chris


On Jan 17, 2007, at 11:26 PM, sims wrote:

At 8:48 PM -0800 1/17/07, Richard Gaskin wrote:
You mean Apple provides no way for any scripting language to request authorization on its own? Not even AppleScript?


For the dialog use AppleScript:
do shell script "command" with administrator privileges

To pass other items use:
do shell script "command" user name "me" password "mypassword" with administrator privileges


sims
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

------------------------------------------
Chris Sheffield
Read Naturally
The Fluency Company
http://www.readnaturally.com
------------------------------------------


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to