Tcl/Tk (back to home page) a graphical toy scriptlet:
get Tcl/Tk

Tcl/Tk is a computer programming language. Specifically, it's a cross platform scripting environment. (It works on Windows, Macintosh, and Unix). It can be used as a "batch language", to tie together existing tools. Or there is a web-browser plug-in that runs a "safe" interpreter within your browser. The Tcl/Tk source code is designed to be easily embeddable (compiled into an existing program).

Tcl is a scripting language. Most data types are represented as strings of characters (string-associative arrays are also provided). The language supports lists (which are represented as strings with white-space separation). Allocation is dynamic, and strings can be large, and full binary strings are supported with Tcl 8.x (i.e.: char 0 or NUL is ok). It provides a traditional I/O model (open/read/puts/close), or an "event driven" one, which is useful with TCP/IP sockets (which are supported).

Timers with millisecond resolution are built-in. Interpreter environments are encapsulated. Executing dynamic data as a script is easy to do. Error handling is done with exceptions, with catch/throw.

Tk is a cross-platform UI toolkit. (a collection of graphic user-interface "widgets", such as buttons, scrollbars and text entry boxes). As of Tk 8.0, it tries to use the "native" widgets of the host operating system (Windows, Macintosh or Unix). Its event model parallels that of X11 (X-Windows), with keyboard symbol names and event names and such.

Widget placement and sizing is typically handled by a "geometry manager", so that the re-size behavior is not explicitly programmed.

Tcl Tk "headquarters" are at www.scriptics.com


The binary releases allow you to write scripts, and they come with a set of demo scripts, including a "wrapper" script (widget.tcl) that provides a browser-like menu to run most of them.  The source release is what you need if you have unix, or want to build Tcl/Tk to an existing program.

go get Tcl/Tk

Links:
•  The Tcler's Wiki: user-contributed resources
•  TclTk.com: TclTk community
•  Tcl/Tk Resource Center has documentation, with manual pages,
      and also contributed applications tools, and extensions.
•  The NASA version of the TclTk browser plug-in
•  a Mac Tcl page on using MPW to build extensions.
•  the Oratcl page had something I wanted to look at.


My Tcl/Tk Scripts:

bgcanv.tcl
For the background image on my home page, I wanted something fractal-like that would still compress well. This script uses XOR to generate some shapes, and I think it has sort of a " Munching Squares" vibe.       see it with the plug-in.


collecting some info on the plug-in, with the idea of making a script that can "repair" a plug-in installation. (The best-behaved windows programs repair their own registry entries to avoid re-install)

[HKEY_LOCAL_MACHINE\Software\Sun\Tcl Plugin\2.0]
"Directory"="F:\\APPS\\TCLPLUG"
  (npNewInstance, npNewStream errs etc)
apps\TclPlug\bin\*.dll to nscp and IE \plugins\ dir