Tcl Script Examples
You have a set of Tcl script examples available in your VisualApplets installation.
You find them in the following directory:
<YourVisualAppletsInstallationDirectory>/Examples/AdvancedVAFunctions/Tcl Scripting
The examples contain extensive notes describing the individual parts of the script.