Version 5 of winutils

Updated 2002-02-01 01:11:57

Purpose: describe the package

The winutils package written by David Graveraux provides a number of Tcl commands that enable Windows operating specific functionality. For instance, executing programs from Tcl on Windows can be troublesome - winutils has a launch and a shell command to assist with this. These commands roughly do the equivalent of exec but permit Windows extensions.

The winutils package is maintained at http://sourceforge.net/projects/tomasoft


Example :

David Gravereaux mailto:[email protected] recently wrote in news:comp.lang.tcl

 Message-ID: <[email protected]>


 You can simplify that down a whole lot with my winutils extension and it's
 winutils::shell command.  It's like `eval exec [auto_execok start] $file &`, but
 without the momentary command prompt flashing up on the screen.

 http://sf.net/projects/tomasoft

 package require winutils
 proc LaunchEditor {myfile} {
    # try the "edit" command first.
    if {[catch {winutils::shell -v edit $myfile}]} {
        winutils::shell -v open $myfile
    }
 }
 proc Launch {args} {
    eval winutils::shell -v open $args
 }

This makes use of associations and even does full URLs in the exact manner and behavior of the "Run..." dialog off the Start menu.

 % Launch mailto:[email protected]?subject=hi%20there&body=was%20up?
 % Launch http://tcl.activestate.com
 % Launch somefile.txt
 % Launch netstat -a 2

I forget if I added the "edit" command to my .tcl association or whether the ActiveTcl installer did it for me..

 % LaunchEditor c:/progra~1/tcl/lib/tcl8.4/init.tcl

http://sourceforge.net/project/showfiles.php?group_id=1616


Category Package