PUTS creates widget instead of outputting a string. I have a script with:
puts "$tcl_platform(os)"
I have also tried it without the quotes.
All I get is a box titled SCRIPTNAME (eg pltfrm1), see attached file.
How do I correct this?
| Attachment | Size |
|---|---|
| $temp004.jpg | 75.81 KB |
The default association on Windows for *.tcl files is wish (WIndowing SHell), which includes Tk and is meant for UIs. You want to run 'tclsh' instead. You can either change the *.tcl file assoc, or start it with tclsh (or tclsh85).
I am now getting a message: I:\UTILITIES\PLTFRM1.TCL IS NOT A VALID WIN32 APPLICATION. If I try from TCLSH(85) I get a different message: CAN'T FIND I:\UTILITIES\PLTFRM1.TCL . Please note that I:\UTILITIES\ is in my PATH. With any luck there are two screenshots attached.
If you pass the file as an argument, it must be fully specified as scripts are not searched for on the %PATH%. I suspect the file association change wasn't done quite right wrt syntax. Look at the end of http://wiki.tcl.tk/1074 for an example.