• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: using a shell variable in an osascript line?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >using a shell variable in an osascript line? (From: LuKreme <email@hidden>)
 >Re: using a shell variable in an osascript line? (From: Axel Luttgens <email@hidden>)
 >Re: using a shell variable in an osascript line? (From: "Mark J. Reed" <email@hidden>)
 >Re: using a shell variable in an osascript line? (From: "Mark J. Reed" <email@hidden>)
 >Re: using a shell variable in an osascript line? (From: René v Amerongen <email@hidden>)
 >Re: using a shell variable in an osascript line? (From: René v Amerongen <email@hidden>)

  • Prev by Date: Re: using a shell variable in an osascript line?
  • Next by Date: Re: using a shell variable in an osascript line?
  • Previous by thread: Re: using a shell variable in an osascript line?
  • Next by thread: Re: using a shell variable in an osascript line?
  • Index(es):
    • Date
    • Thread