#> ENTRY key=val #> SCALE key=val from:to:step #> RADIO key=val opt1,opt2,opt3,... #> CHECK key=val opt1,opt2,opt3,... #> IFILE key=val #> OFILE key=val #< -tkopt1 tkval1 -tkopt2 -tkval2 ... # #> HELP key One-line helpers for this particular keyword # #> -EXEC # any code inbetween here is not executed by tkrun #> +EXEC #It is also possible to put these lines on the same line as the shell variable in e.g. c-shell scripts, e.g.:
set a=1 #> SCALE a=1 0:10:0.1but this is a new feature and will possibly be modified to not have to specify the variable setting "a=1" twice.
checkbuttons and radiobuttons do not layout their buttons efficiently, and the overal layout is limited to fit your (vertical) screensize. Planned fix is to use the grid(3) geometry manager, instead of pack(3) .
The additional Tcl/Tk options (on a #< line immediately following the #> line) are not working.
The code is horribly non-defensive, and does not handle syntax errors on the #> tag lines very well.
http://sunscript.sun.com/ Home Page of Tcl/Tk (now gone) http://www.neosoft.com/ Archive of Tcl/Tk tools http://tcl.sourceforge.net/ Current home page and source code repo
% tkrun designWould create a Tcl/Tk script called ‘‘design.tk’’, extract keyword info and run this script, which in turn will call ‘‘design’’ with your selection of ‘‘keyword=value’’ pairs.
% tkrun -r tsf itemize.cshparses the GUI elements from itemize.csh, and will call the tsf program.
Here is a very simple script, called testscript in the source code distribution:
#! /bin/csh -f # # here are some basic GUI elements # #> IFILE in= #> OFILE out= #> ENTRY eps=0.01 #> RADIO mode=gauss gauss,newton,leibniz #> CHECK options=mean,sigma sum,mean,sigma,skewness,kurtosis #> SCALE n=3.141592 0:10:0.01 #< -digits 2 #< # parse named arguments foreach a ($*) set $a end #> -EXEC echo If this is executed, tkrun does not work properly yet #> +EXEC echo ARGS: in=$in out=$out eps=$eps mode=$mode options=$options n=$n echo TESTSCRIPT echo 0 : $0 set count=0 again: if ($#argv == 0) exit 0 @ count++ echo $count : shift argv goto again
~/.tkrunrc (optional) global configuration file $run.key keyword file in which key=val pairs are maintained
18-aug-97 V0.1 released for ADASS97 paper (tcl/tk 7.6/4.2) PJT 30-jan-98 V0.2 added -e, and some minor features PJT 22-apr-04 V1.2 added option to share the set and #> comment on one line PJT 12-jun-08 V1.4 updated doc and minor code cleanup PJT 24-dec-09 V1.7 implemented the load/save of key=val files PJT
Table of Contents