Re: Passing arguments to the script from command line.
Re: Passing arguments to the script from command line.
- Subject: Re: Passing arguments to the script from command line.
- From: Chris Janton <email@hidden>
- Date: Thu, 13 Jan 2005 08:22:47 -0700
Hi List,
I have saved a script as an application. Is there any way to pass
command line
arguments to the script, it this script is executed from the command
line.
No can do. The only arguments you can currently pass into a script is
a list
of aliases when using your script as a droplet. No command-line options
exist.
Sure you can ;-) you just have to decide what "passing arguments"
really means.
This script
set myPATH to do shell script "echo $PATH"
display dialog myPATH
set myVARIABLE1 to do shell script "echo $VARIABLE1"
display dialog myVARIABLE1
when saved as an application and invoked from the command line will
display your path and then an empty dialog box
unless you invoke the application like this
% VARIABLE1=mynamehere ./testApp
in which case you will see mynamehere in the second dialog box.
There's always room for Jell-o
p.s. if you insist on using tcsh this will work
setenv VARIABLE1=something ; ./testApp
8)
----------------------------------
Chris Janton - face at CentosPrime dot COM
Netminder for Opus1.COM
_______________________________________________
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