一段tcl代码
#!/usr/bin/wish proc icanspeak {} { set name [.ent get] if {[string length $name] != 0} { exec s $name } } label .lab -text "Enter word:" entry .ent button .but -text "<\")))><" -command "icanspeak" #pack .lab pack .ent pack .but bind . <Return> ".but invoke" set width 145 set height 60 set x [expr { ( [winfo screenwidth .] - $width ) }] set y [expr { ( [winfo screenheight .] - $height ) }] wm title . "><(((\">" wm geometry . ${width}x${height}+${x}+${y} wm attributes . -topmost 1