Variables are a way of storing information that might or might not change during the running/setting up of the script.
for example
alias vartest {
set %variable1 one
echo 01 -a %variable1
set %variable2 two
echo 01 -a %variable2
set %variable3 $input(type something,e)
echo 01 -a %variable3 <-- you typed that part, the script didn't know what you would type so it couldn't be 'hard' coded.
unset %variable*
}
/vartest
there are local and global variables, depending on whether the script needs to remember them once it's done processing. local variables can be discarded and are "set" using /var %varname = value.
Global variables are used to store information that may be needed again(a filepath for example that once set doesn't need to be changed or a value called from more than one script) and are set using /set %varname value. It should be noted that global variables can be changed by other scripts(hence the name global) and local variables can only be accessed by the script that created them.
Try to use local variables wherever possible and look at either non-conflicting names for your globals (for example I could use %btk-var-name with little fear of someone elses script using that variable name, rather than %b etc.) or other ways of storing permanent information ( .ini or .txt files perhaps)
Hopefully that gives you the groundwork. As everyone else has said, the helpfile is your friend ;o)
btk