• 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: Passing calls to an AS app via shell?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing calls to an AS app via shell?


  • Subject: Re: Passing calls to an AS app via shell?
  • From: Chris Espinosa <email@hidden>
  • Date: Fri, 8 Oct 2004 14:49:42 -0700

On Oct 8, 2004, at 2:34 PM, Christopher Nebel wrote:

Of course, if you're synthesizing the script on the fly, then you don't need to bother passing any parameters -- just synthesize the correct script:

$ osascript -e 'tell application "Terminal"' -e 'display dialog "Version: '`sw_vers -productVersion`'"' -e 'end tell'

Yeah, I worked on that for a while, but I couldn't get the quoting right. For the record, it goes:
-e The "execute this line" argument to osascript
single quote The start of the -e parameter
display dialog The AppleScript command to execute
double quote The start of the parameter to the AppleScript display dialog command
Version: The text of the first part of the display dialog parameter string
single quote Close the first part of the -e parameter
accent ague Beginning of another UNIX command to execute, the result gets concatenated to prior string
sw-vers -productVersion
Unix command to get the product version
accent ague Close the UNIX command and concatenate its output to the previous single-quote string
single quote Open another UNIX shell string
double quote Close the display dialog parameter string
single quote Close the shell string and concatenate it to the UNIX command output and display dialog command

It's amazing that no backslashes were harmed in the making of this script :-)

Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Passing calls to an AS app via shell? (From: Johnny AppleScript <email@hidden>)
 >Re: Passing calls to an AS app via shell? (From: Joshua See <email@hidden>)
 >Re: Passing calls to an AS app via shell? (From: Chris Espinosa <email@hidden>)
 >Re: Passing calls to an AS app via shell? (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: Passing calls to an AS app via shell?
  • Next by Date: Re: Script Debugger 3 and AppleScript Studio
  • Previous by thread: Re: Passing calls to an AS app via shell?
  • Next by thread: Re: Passing calls to an AS app via shell?
  • Index(es):
    • Date
    • Thread