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

Re: Program arguments


  • Subject: Re: Program arguments
  • From: tom wible <email@hidden>
  • Date: Tue, 22 May 2007 19:40:53 -0400

i've written applescript apps that run both from the gui & cli, passing args thusly:

on run argv

	try
		set i to (count (argv))
		if item 1 of argv = "updateCrontab" then
			set interactive to false
			-- fall-thru
		else if -- more stuff...
		end if

	on error
		--	no argv if run from gui	- app only?
		set interactive to true
		--	more stuff...
...
_______________________________________________
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: Program arguments
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: (OFF) ANN: Missing Link 2.3b2
  • Next by Date: Re: Which drive is a CD in?
  • Previous by thread: Re: Program arguments
  • Next by thread: Re: Program arguments
  • Index(es):
    • Date
    • Thread