Re: using a shell variable in an osascript line?
Re: using a shell variable in an osascript line?
- Subject: Re: using a shell variable in an osascript line?
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 27 Feb 2009 10:46:27 -0500
On Fri, Feb 27, 2009 at 10:41 AM, René v Amerongen <email@hidden> wrote:
> I Get "53:66: execution error: Can’t get text returned of {button
> returned:"OK"}. (-1728)"
Yes. That would be due to the lack of a "text returned" field
anywhere between those curlies. I do see a "button returned", so I
would try that. :)
But setting a variable inside the Applescript isn't going to do any
good in the shell. Osascript outputs the return value of the last
statement, so just ending the script with "button returned of (display
dialog...)" (or, equivalently, "display dialog ..." followed by
"button returned of result") should cause osascript to output "OK" or
"Cancel", which you can store in a shell parameter using command
substitution.
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden