Re: Command line question
Re: Command line question
- Subject: Re: Command line question
- From: garbanzito <email@hidden>
- Date: Thu, 2 May 2002 23:01:34 -0600
at 2002 05 02, 12:02 +1200, they whom i call David Hood wrote:
I know I can invoke applets from the terminal command line. My question is, is
there any way I can provide parameters/arguments for the script from
the command
line.
the natural route would be with the osascript command, but
the man page is discouraging: "osascript does not yet
provide any way to pass arguments to the script." however,
you can work around this by using osascript to call the
script indirectly.
using your example, and simplifying the location of bigRedButton for
example purposes, it would work like this:
osascript \
-e 'set the_script to (load script alias "somewhere:bigRedButton")' \
-e 'tell the_script to mysteriousSyntx ("Oz")'
(that was three lines.) so, assuming your goal is to do
something like call this from something like a shell script,
you'd just need to substitute whatever string argument you
wanted for "Oz" ...
nicer would be to work up a shell script ("run_script", say)
that would make the process generic, something like:
run_script bigRedButton mysteriousSyntx Oz
--
steve harley email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.