nevermind about the /. Just discovering '' vs "" usage. Still learning livecode and the cheat sheets are not as robust as I would prefer.
On Wed, 3 Jul 2019 at 12:50, Dalton Calford <[email protected]> wrote: > Thanks Mark, > > I was playing with shell() to see if it would work. I am having some > path/string issues and can't find a simple example script to show me what I > am doing wrong. > > If I am just using the message box, I can type "put shell(vdir)" and it > works perfectly for the default path. If instead I ask "put shell(vdir > /etc)" or "put shell('vdir /etc') etc into the message box, all I get is an > error. Is the / a special character that needs to be escaped or > something else? > > best regards > > Dalton > > On Wed, 3 Jul 2019 at 12:41, Mark Wieder via use-livecode < > [email protected]> wrote: > >> On 7/3/19 8:28 AM, Dalton Calford via use-livecode wrote: >> > I am looking to read/write odbc settings from within livecode, but due >> to >> > user rights, I want to allow for sudoer style rights elevation. >> > >> > Is there a way to present the user with a dialog asking for password >> from >> > within livecode? >> >> sudo -S is your friend. Try something like this: >> >> on mouseUp pMouseButton >> local tCommands >> local tPassword >> >> put "apt update" into tCommands >> ask password "type your sudo password" >> put it into tPassword >> get shell("echo" && tPassword && "| sudo -S" && tCommands) >> put it into field 1 >> end mouseUp >> >> -- >> Mark Wieder >> [email protected] >> >> _______________________________________________ >> use-livecode mailing list >> [email protected] >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
