Using arguments with an applescript program

I’ve created two Applescript programs. The first one is called “titi” and the purpose of this program is to call another applescript program called “toto”.

The only things “toto” is asked to do at this time is to read the argument and to display it.

Is there something special I need to do when calling Applescript program with arguments.

At this time I only have one arguments.

Once I get this working “titi” wlll need to pass two arguments to “toto” and “toto” will be returning a value to “titi”. “titi” will then need to display the return value from “toto”

Does anyone has a place for me to read and to know more arguments with applecsript?



set theOrder to (path to home folder as text) & "Desktop:"
set POSIXtheOrder to POSIX path of theOrder
do shell script POSIXtheOrder & "toto Testing"


on run Arg1
	set abecd to Arg1 as string
	display dialog Arg1
end run

I refer to the last two example codes in this post

I don’t understand why you use do shell script to trigger toto which is a plain vanilla AppleScript.

Yvan KOENIG (VALLAURIS, France) samedi 15 janvier 2011 15:52:41