Passing parameter from shell to applescript

Hi

I am new to applescript. I just can’t found any info on this.
I have a shell script that do a build process. We like to have it send a email to everyone when it is done. I found a applescript that can do the mail part. Now how can I call this applescript from the shell scipt passng all the parameters like bodytext, attachment, and subject? :frowning:

From the terminal “man osascript”:

osascript does not yet provide any way to pass arguments to the script

I’m not sure, but perhaps you can build a temp applescript on-the-fly, then “osacompile” it, then “osascript” it…
:?:

I would like to see the mail script you have. I have a need that is similar.
For shell scripting and terminal CLI scripting here are some technotes and examples:

http://www.apple.com/applescript/terminal/

http://developer.apple.com/technotes/tn2002/tn2065.html

As noted in the TechNote the best way to pass all the parameters to a file and then use the info in the file to build the next part of the script.

I am going to start with their sample mail script

http://developer.apple.com/qa/qa2001/qa1018.html

add a functios to read in a text file with all the mail info. (subject,name,mailmessage)

Basically passing parameters using a text file. Not pretty but work.