• 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: osascript shell commands using AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: osascript shell commands using AppleScript


  • Subject: Re: osascript shell commands using AppleScript
  • From: Christopher Nebel <email@hidden>
  • Date: Thu, 26 Jun 2008 19:31:46 -0700

On Jun 24, 2008, at 2:53 PM, Bill Cheeseman wrote:

Based on your model, I'm thinking the script file itself would look like
this:


#!/usr/bin/osascript
on run(args)
   return "Hello, " & first item of args as string & "!"
end

Then when Installer runs the script during installation, the call to 'first
item of args' would return the value of $1. Is that your expectation?


But then how do I get the environment variables that PackageMaker/ Installer
provide?

"system attribute" was extended some time ago to support this. (Though the sub-shell trick would also work.)


	system attribute "HOME"
	--> "/Users/nebel"

Or, in your case, 'system attribute "installedPath"'.


--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:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: osascript shell commands using AppleScript
      • From: Bill Cheeseman <email@hidden>
References: 
 >Re: osascript shell commands using AppleScript (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: Database Events Problem
  • Next by Date: Re: can applescript monitor keyboard input
  • Previous by thread: Re: osascript shell commands using AppleScript
  • Next by thread: Re: osascript shell commands using AppleScript
  • Index(es):
    • Date
    • Thread