<HTML><FONT FACE=arial,helvetica><FONT COLOR="#000000" FACE="Geneva" FAMILY="SANSSERIF" SIZE="2">If you don't mind the password being briefly sent in the clear (as part of the name of the process), you can use this:<BR>
<BR>
</FONT><FONT COLOR="#000000" FACE="Lucida Grande" LANG="0" SIZE="2">get shell("echo '"&amp;pwd&amp;"' | sudo"&amp;&amp;cmd)</FONT><FONT COLOR="#000000" FACE="Geneva" FAMILY="SANSSERIF" SIZE="2"><BR>
<BR>
Which comes out to something that looks like:<BR>
echo 'MyPassword' | sudo MyCommand<BR>
<BR>
Unfortunately, open process appears to be still broken on OS X. If it wasn't, you could use the "-S" option to sudo to write the password to the process. This is really the way it should be done security-wise.<BR>
<BR>
(something like this)<BR>
<BR>
put "sudo -S"&amp;&amp;myCmd into theProcess<BR>
open process theProcess<BR>
write MyPassword&amp;cr to process theProcess<BR>
read from process theProcess until eof<BR>
close process theProcess<BR>
<BR>
You can also, of course, execute AppleScript on Mac which should give you the same results as AppleScript Studio can achieve.<BR>
<BR>
You could also write the password to a temporary file and pass that to sudo.<BR>
<BR>
HTH.<BR>
<BR>
------------------------------<BR>
Brian Yennie<BR>
Chief Technology Officer<BR>
QLD Learning, LLC<BR>
www.QLDLearning.com<BR>
<BR>
PH: (904)-997-0212<BR>
EMAIL: Yennie@aol.com<BR>
-------------------------------<BR>
</FONT><FONT COLOR="#000000" FACE="Geneva" FAMILY="SANSSERIF" SIZE="2"></FONT></HTML>