I was told you can pass a value to a script and then use this value in a variable. Can I see an example snippet of code that demonstrates the commands used for doing this.

I think it is the #def command, but I'm not sure where to place it exactly, and an example script would go a long way in understanding this.