Common writable folders

J. Landman Gay jacque at hyperactivesw.com
Thu Jan 18 17:03:08 EST 2007


Chris Sheffield wrote:
> 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.

While I was reading Apple's web page, I think I stumbled on the answer 
to this. Bascially, every line of a shell command starts a new shell 
(which won't contain any state variables, and will therefore force the 
dialog to appear again.) To force it to execute in the same shell and 
retain the admin privileges, you separate commands with semicolons, like 
this:

  do shell script "command1;command2".

If your Rev script has to use Rev commands in between shell commands, I 
don't see any way to avoid two admin dialogs because you will have to 
call "shell" twice. But then, I wasn't doing so well with my other 
question either so maybe someone else knows.

If you could get the user and password back from the admin dialog, you 
could issue the second shell command by supplying the user and password 
to the applescript line. But I don't know how to do that. When I ask for 
the result, I only get back empty if it was successful.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list