Re: Passing calls to an AS app via shell?
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