How to use Tcl/Tk =================================================================== Interactive Mode =================================================================== ------------- About Tcl ------------- To invoke Tcl scripts, > tclsh To see the list of Tcl commands % ? To exit Tcl shell, % exit ( Example ) % expr 2 + 2 ------------ About Tk ------------ To invoke windowing shell, wish, > wish To see the list of Tk commands, % ? To exit wish, % exit ( Example ) % button .b -text "Hello, world!" -command exit % pack .b =================================================================== Script File =================================================================== 1) Open a file named hello.tk by using an editor. 2) Type the following commands into the file; #!/opt/bin/wish -f button .b -text "Hello, world!" -command exit pack .b 3) Change the file mode; > chmod +x hello.tk 4) Type the following to invoke; > hello.tk =================================================================== Written By Eunmi Choi (4/18/95)