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: Christopher Nebel <email@hidden>
- Date: Fri, 8 Oct 2004 14:34:18 -0700
On Oct 8, 2004, at 1:35 PM, Chris Espinosa wrote:
The best way to send params to an OSAScript is to set them as
environment variables in the Shell, then use 'system attribute' in the
AppleScript to access them:
$ export dd_string=`sw_vers -productVersion`
$ osascript -e 'set theVersion to system attribute "dd_string"' -e
'tell application "Terminal"' -e 'display dialog "Version: " &
theVersion' -e 'end tell'
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 'set theVersion to system attribute "dd_string"' -e
'tell application "Terminal"' -e 'display dialog "Version: '`sw_vers
-productVersion`'"' -e 'end tell'
--Chris Nebel
AppleScript Engineering
_______________________________________________
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