• 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: Submitting Parameters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Submitting Parameters


  • Subject: Re: Submitting Parameters
  • From: Steve Hayman <email@hidden>
  • Date: Wed, 18 Apr 2007 15:42:48 -0400

osascript /Users/ronny/Documents/Scripts/GrowlFaxNotify.scptd
I want to submit a parameter which should be processed inside the script.

"man osascript" shows how you can pass command line arguments (as of Tiger.) You can pick them up in a run handler via the "argv" parameter that people don't usually use - , e.g. you write this



on run argv return "hello, " & item 1 of argv & "." end run

and then you run it like this

	$ osascript myScript.scptd steve
	hello, steve.


How's that? steve

_______________________________________________
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: Submitting Parameters
      • From: Christopher Nebel <email@hidden>
References: 
 >Submitting Parameters (From: Ronald Hofmann <email@hidden>)
 >Re: Submitting Parameters (From: Lee Noble <email@hidden>)

  • Prev by Date: Re: Setting Icon of a Doc
  • Next by Date: Re: Submitting Parameters
  • Previous by thread: Re: Submitting Parameters
  • Next by thread: Re: Submitting Parameters
  • Index(es):
    • Date
    • Thread