29. January 1996 ---- File Selection Box for Windows and UNIX -------------- This archive contains a Tcl dynamic extension file to create a 'ls' command in Tcl. Because the 'exec' command is not working under Windows I have implemented the 'ls' command in Tcl. With this command it is possible to develop a File Selection Box for Windows. I have adapt the source file for UNIX too. I have tested it on HPUX. Files: ------ Makefile.hp the makefile for HPUX makefile.bc the makefile for Borland 4.5 tcl_ls.dll the Windows dynamic extension tcl_ls.sl the HPUX dynamic extension filesel.tcl the Tcl/Tk File Selection demonstration tcl_ls.c the source file of the dynamic extension Adaptation: ----------- Please adapt the makefile to create a own dynamic extension file for your system. Usage: ------ Adapt the varaibles LS_EXT_DIR and LS_EXT_FILE in the file 'filesel.tcl'. Set or unset the comment character and modify the directory names. If you do not have a HP workstation you have to build a extension dynamic library for your system. Adapt the makefile and compile the source 'tcl_ls.c'. Start the wish programm: 'wish4.1 filesel.tcl' With a simple click you can select a file name. With a double click you can select and change a directory (named by a added '/' character) or you select the filename (the File Selection Box is closed). The selected file name is shown on stdout (Remove the puts command if you want use the file selection procedure in your own script). Remark: ------- I added a 'system' command. With this command you can start a system process like 'exec'. Attention: Under Window 3.11 it will start the DOS Box only. Than you have to enter the desired command (e.g. 'system dir' starts only the DOS Box without execution of 'dir'). Under Windows95 the specified command will be performed, but you cannot import the result in Tcl (The DOS Box is visible for a short time and automatically closed). In Windows95 you can use the command 'system edit' to open the DOS editor from Tcl. Good luck. Torsten Jaekel ------------------------------------------------------ | Company: SIEMENS AG, AUT 33E1 | | Phone: xx49 30 386 24779 | | email Company: jaekel%sagaut@germany.eu.net | | email Private: Torsten.Jaekel%t-online.de | ------------------------------------------------------