Getting values returned by Unix command-line programs
Getting values returned by Unix command-line programs
- Subject: Getting values returned by Unix command-line programs
- From: Rob Lewis <email@hidden>
- Date: Wed, 17 Mar 2004 20:35:31 -0800
In Applescript, how do you retrieve values returned by Unix
command-line programs? The program of interest outputs a
space-delimited string of values, which I can retrieve with:
set retval to do shell script "myprog"
set AppleScript's text item delimiters to " "
set newText to text items of retval
set myvar to item 4 of newText
But the developer told me that the program also exits with a value of 0
or 1 depending on its result. How do you pick up this value?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.