In Automatic Mouse and Keyboard, a script can play another script. Play another script just like invoke a function, you can pass arguments and receive script return value.
You can learn how to pass and receive arguments from PlayScriptSample1.zip.
And you can learn how to modify values in another script from PlayScriptSample2.zip.