How to run a Tcl script in Windows
Download & Install ActiveTcl
First and foremost, go to http://www.activestate.com/activetcl and download ActiveTcl for Windows
or go to or http://sourceforge.net/projects/tcl/ and download and install Tcl from sources (advanced users only).
Run Tcl Scripts
There are three approaches to starting scripts in Tcl: source, shortcuts, and file associations.
- The first way is to launch the Wish application and use “source”. This is the best way to debug scripts. Not useful for your average user.
- The second alternative is to create an icon or shortcut. The binary release uses this technique for the widget tour icon.
The command line for the icon should be something like:
C:\\Program Files\tcl\bin\wish.exe C:\myscript.tcl
- The third way to launch a Tcl script is to create a file type association for the extension “.tcl” (or “.tk”). Using the File Manager (Windows Explorer> My Computer), create a new file type for .tcl, and add an “open” action. The command for the action should be something like:
“C:\\Program Files\tcl\bin\wish.exe” “%1”
Once you have set up the association, you will be able to double click on script files in File Manager to launch the app.
Note that if either the location of wish or the location of the script contains spaces in any of the file names, you must enclose the name in quotes.
For example: “C:\\Program Files\tcl\bin\wish.exe” “C:\\Program Files\myscript.tcl”
Also, please note, I don't know where tcl is installed on your system. “C:\\Program Files\tcl\bin\wish.exe” is just a guess.
— tonybaldwin 2012.01.03.19.27