• 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: 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
  • Follow-Ups:
    • Re: Passing calls to an AS app via shell?
      • From: Chris Espinosa <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>)

  • Prev by Date: Change desktop iPhoto alb.
  • Next by Date: Re: Passing calls to an AS app via shell?
  • 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