Mac app to read system log file
bvlahos at mac.com
Wed Dec 1 16:16:20 EST 2010
That works perfectly.
In my program I will be importing many files at once using drag and drop. The code below works fine except that it asks for authentication for each file as it loops through them. Is there a way I can issue the elevated command so that it only asks me once?
put empty into field "raw" --initializes the field
repeat for each line i in the dragdata["files"]
if ".local" is in i then --check for correct type of file
put "cat" && quote & i & quote into tCommand
open elevated process tCommand for read
if the result <> empty then exit to top -- user cancelled authentication
read from process tCommand until EOF
put it & return after field "raw"
Thank you very much.
On Nov 24, 2010, at 1:44 PM, Phil Davis wrote:
> on mouseUp
> answer file "???"
> if it = empty then exit to top
> put "cat" && quote & it & quote into tCommand
> open elevated process tCommand for read
> if the result <> empty then exit to top -- user canceled
> read from process tCommand until EOF
> put it into fld 1
> close process tCommand
> end mouseUp
> Happy Thanksgiving!
> On 11/24/10 12:04 PM, Bill Vlahos wrote:
>> I have a Mac application to read log files that need administrative permission (sudo) to read. How can I prompt for this?
>> Bill Vlahos
>> InfoWallet (http://www.infowallet.com) is about keeping your important life information with you, accessible, and secure.
> Phil Davis
> PDS Labs
> Professional Software Development
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode