Re: guicom - report
At 08:35 AM 3/1/2000 -0500, Fred wrote:
<snip>
>One thing that can be done is to build a menu that gives access to any
>.tcl script, so that custom ones can be put in a directory somewhere and
>will appear by name under a menu, say "Scripts". This will allow people
>to code up smaller scripts and drop them into the dropbox, which
>everyone can put in the script directory and then have them appear by
>name in the menu without having to modify tkemc.tcl. I don't know if
>this will be very useful, but the Tcl/Tk code for this is:
>
>set scriptdir /usr/local/emc/scripts
>set files [exec /bin/ls $scriptdir]
>foreach file $files {
># make sure 'menu' is defined already
> if {[string match *.tcl $file]} {
> $menu add command -label $file -command "exec $scriptdir/$file &"
> }
>}
Thanks for the code.
We've been kicking around the idea of another heading in the genedit editor
that inserts canned code into the showing program. I haven't had time to
figure out how to make that menu responsive to new files. (like the gimp
does) This does it.
With this we should be able to develop TclTk scripts that compute and write
nc code for bolt patterns, common mill patterns, dxf converter and such.
Then by placing that file in the emc/scripts directory will allow automatic
access from within the genedit editor.
Ray
Date Index |
Thread Index |
Back to archive index |
Back to Mailing List Page
Problems or questions? Contact