Help 2.0 for Tcl/Tk 8.2.x under Windows
The Help 2.0 package is an extension to the TclTk 8.2.x BINARY release for use with Windows operating environments. The package provides an interface between Tcl/Tk scripts and the Microsoft Winhelp system.
Installation
Download the Help 2.0 extension into your $tcl_library directory. Unpack the archive using a utility that preserves the directory structure ambedded in the archive. This should result in a new sub-directory called help2.0 that contains the extension DLL file, a pkgIndex.tcl file, and a console.tcl file. This latter file is a modified version of the standard console.tcl file that is shipped with the Scriptics release of Tcl/Tk. It provides context driven help lookups to Winhelp database files, and, if you have installed the Tkprint 1.1 package, native windows printing and capture of your console display.
Using the Help 2.0 Package
The package can be loaded with the command:
package require Help 2.0
The package provides 1 command of the general form:
help ?-file? ?file? ?-topic? ?topic? ?-list? ?-update? ?-add? ?name?
The command has a simplified form as follows:
help topic
The simplified form is recognized as the case where no other option switches are found on the command line.
The help command finds Winhelp topics in Winhelp database files. By using the -file option you specify the name of a Winhelp file that is to be searched for a specified with the -topic option. When Help 2.0 is first used, it will have no knowledge of the help files that you wish to use for searches, so you must specify at least one file name for the package to be useful. Once a file name is specified, Help 2.0 will retain its location for future searches.
The -list option will return a list of the current help files that the package will try to search for topics. The -update option will write the current list of help files to the Windows WIN.INI file. Subsequently, when Help 2.0 is loaded, it will recover the list of files to be used from the INI file.
The -add option will immediately add a file name to the permanent list of help files to be searched.
For example:
help -file c:/Program Files/Tcl/doc/tcl82.hlp -topic scan
will add the standard Tcl help database to the search list and pop up a dialog asking which of the database topics relating to the scan command you wish to examine. If you then issue the command:
help -update
The Tcl help database will be added to the list maintained in the INI file. You can thereafter do the following:
help checkbutton
where checkbutton could be any Tcl/Tk command for which there is an entry in the database.
The console.tcl File
This file is a modified version of the standard console.tcl file that is found in the $tk_library directory. It adds a button bar across the top of the console text window with buttons for a few commonly used features of the console, specifically those features that I use a lot.
If you want to use this version of console.tcl, you can, after making a BACKUP COPY of the standard console.tcl file, copy this one into the $tk_library directory. When you start wish.exe, the modified console should appear.
This version of the console.tcl script tries to load the Tkprint 1.1 package and the Help 2.0 package. If it does not find these packages, it just continues without providing the additional features that these extensions offer. If you have the Tkprint 1.1 package, you will see 2 buttons, labeled Print and Capture. The Print button will print a paginated copy of the contents of the console window on your local Windows printer. The Capture button will save a copy of the wish console to a Windows .BMP format file named "console.bmp"
If you have the Help 2.0 package installed, you will see a button labeled Help. When you click this button, you will get a popup that lists the currently registered help files in the WIN.INI file. By choosing one of these files, the help package will search that database for a topic that is the current text selection in the console window. If there is no selection, then the help file selected will be loaded and its table of contents will be displayed. If the selection turns out to not be a topic in the selected help file, then the search index dialog for the help file is initiated.
Warranty
None. This package is provided as is, without warranty of any kind. Use at your own risk.
License
Free for private, non-commercial use. Redistribution is permitted for non-commercial purposes only. Resale is prohibited.
Source
Yes, you can have it. Its so trivial that I do believe you can write it yourself faster than requesting it, but...
Email : customclients@videotron.ca