Creating Compiled HTML Help

by Alyce Watson - http://alycesrestaurant.com/
- Alyce Alyce

What is Compiled HTML Help?

You have probably seen it as part of many software applications. The compiled file has the extension "CHM" and when run, it looks something like this little example:
help12.gif

What do I need to make CHM files?

You can make CHM help files from a set of HTML files. You can create these easily with any HTML editor, or even with Notepad. You can even create your own HTML editor written in Liberty BASIC. If you use an HTML editor, follow the guidelines that come with the application. For a brief tutorial that explains simple HTML creation in a texteditor such as Notepad, see issue #52 of the Liberty BASIC Newsletter.

How do I write good documentation?

See the article "Help (...is on the way)" by Jerry Muelver
- jmuelver jmuelver. Also, be sure to read the Tech Writing How-To.

How do I compile HTML pages to a CHM file?

You use the free Microsoft HTML Help Workshop available for download here: HTML Help Workshop Page

I've got HTML Help Workshop and HTML files...

Now what do I do?

Here is a step-by-step walk through that creates a compiled help file from a set of HTML files. The project shown here is available for download here: It includes HTML, HJP, HHC and HHK files.

  • Create a new project in HTML Help Workshop by choosing "File", then "New", then "Project."
help1.gif

  • Select a folder for the project - choose the folder that contains the HTML files. Click the "Browse" button to select a folder and type a name for your project.
help2.gif

  • The wizard gives you the option to choose existing files when creating the project. Select "HTML files (.htm)" option by putting a mark in the checkbox.
help3.gif

  • Click the "Add" button to find your directory and select all of the HTML/HTM files.
help4.gif

  • The wizard finishes and your project looks something like this:
help5.gif

  • Click the top "Change project options" button and use the "Options" dialog to specify the default topic from your list of HTML files. You should also give your project a Title in this dialog. The Title will be displayed in the titlebar of your finished project.
help6.gif

  • You have now done enough to compile a CHM file. At this point, it will not have the space on the left side with Contents, Index and Search features. Your project will be much more user-friendly if you add these navigational aids, and it only takes a little more work. You have been working in the "Projects" area, and to get back to it any time, click the "Projects" tab. In all of the areas, Project, Contents, and Index, you will find buttons along the left side that allow you to add and modify items and settings for that area.
help5.gif

  • Table of Contents: Click the "Contents" tab in the main workshop window to create a Table of Contents. Choose to "Create New" file. Click the "Add" button to add a topic to the TOC. You'll be asked to name the topic and click the "Add" button to choose the html page for the topic. This example calls the topic "Main Page" and specifies "index.htm" as the HTML page for the topic.
help7.gif

  • Click the "Insert Page" button to add more topics, each time giving the topic a name and an associated HTML page as you did in the previous step.
help8.gif

  • Index: Now you can add keywords to your project, so that your users can find things easily in the navigational index. Click the "Index" tab, then click the "Insert a keyword" button to open the keyword dialog.
help9.gif

  • Type a keyword or phrase, then click the "Add" button to select the HTML file(s) to associate with it. This information will be used to create an index.
help10.gif

  • Search: If you want your users to be able to search the file for any term, then you must be in the "Project" tab in the workshop window and click the top button on the left side to "Change project options." This invokes the options dialog. Click the "Compile" tab and check the box that allows full-text search information to be included.
help14.gif

  • Now you are ready to create the compiled help file. Just click the "Compile" button or choose "Compile" from the "File" menu and you are finished.
help11.gif

  • Your compiled project will look something like this:
help12.gif

  • Users can find keywords in the index, or even search the file.
help13.gif

  • To run a CHM file from a Liberty BASIC program, use the RUN command to run hh.exe. Include the name of the compiled helpfile. In this example, it's "mainpage.chm".

run "hh.exe mainpage.chm"