All pastes #475858 Raw Edit

Mine

public text v1 · immutable
·published 2007-05-07 18:57 UTC
rendered paste body

menu .menubar
. config -menu .menubar
foreach me {File Help} {
 set $me [menu .menubar.m$me]
.menubar add cascade -label $me -menu .menubar.m$me
}
 $File add command -label Quit -command exit
 $Help add command -label About -command {tk_messageBox -message "TKrun ver 0.1 by Andrew Coughlan. 2007"}

label .1 -text "Program to run:"
entry .e -relief sunken -width 30 -textvariable\
  fname
pack .1 -side left
pack .e -side left

if { $fname=="xterm" } then {
bind .e <Return> {
 exec xterm }
} else { bind .e <Return> {
exec xterm -e $fname
 }
}