Scripts and Utilities -- Tcl/Tk links file (for use during the lecture)


  • Brad Vander Zanden
  • Directory: /home/cs494/notes/tcltk
  • This file: http://www.cs.utk.edu/~plank/plank/classes/cs494/494/notes/tcltk/lecture.html
  • Lecture links: http://www.cs.utk.edu/~plank/plank/classes/cs494/494/notes/tcltk/links.html
  • Tcl/Tk information: http://www.tcltk.com All sorts of information about Tcl/Tk, including tutorials, demos, man pages, and FAQS.
  • Email questions and answers
  • Demo programs: /usr/local/X11R6.3/lib/tk4.1/demos

    Getting Started With Tcl/Tk

    wish
    

    Sample Tcl/Tk Applicatins

    cd /home/cs494/notes/tcltk
    ping
    timer
    

    Playing with the Interpreter

    set a "Brad Vander Zanden"
    puts stdout "My name is $a"
    puts stdout {My name is $a}
    set date [exec date]
    puts "$a gave this lecture on $date"
    

    Examining Code

    1. open ping
      text .test -width 10 -height 5 -bd 5 -relief sunken
      pack .test -side left
      pack .test -side top
      pack .test -side right
      pack .test -side top
      text .test2 -width 30 -height 5 -bd 10 -relief raised
      pack .test2 -side left
      pack .test1 -side right
      pack .test2 -side top
      

    2. augmented ping
      • open pinghelper
      • open ping2

    3. open timer