Using Help Author to Build a Simple Help File

This section explains how to create and build a simple Help file using Microsoft Help Author. The simple Help file consists of two topics, and one of the two topics includes a jump to the other topic.

To build this simple Help file, you will:

nCreate a project subdirectory for the source files.

nDefine a new Help project using the Help Project Editor.

nCreate two topics using Word for Windows: enter context strings for the two topics, code a jump from one topic to the other, add a bitmap to one topic, and save the topic file as RTF.

nBuild the Help file.

nTest the Help file by displaying it in Windows Help.

Note:

This section assumes you have already installed Help Author. If you have not, please go to Chapter 5, “Using Help Author,” and read the installation instructions before going any further.

Creating a Project Subdirectory

When you create a Help file using Help Author, you may want to create a separate project subdirectory for all the source files. (You might also create separate subdirectories for the bitmaps in your Help file.) For this example, create a temporary project subdirectory called SAMPLE in the Help Author directory.

To set up the SAMPLE subdirectory

nEnter the following commands at the MS-DOS prompt:

cd \helpauth (or the name of the directory you specified during setup)
md sample

Starting the Help Project Editor

Help Author uses the Help Project Editor to control the Help creation process. So, to create a Help file, you first start the Help Project Editor. After starting the Help Project Editor, you can define the new project, add topic files, start builds, and view the completed Help file.

To open the Help Project Editor

1.1.Start Windows if it is not already running.

2.2.Open the Help Author group window in Program Manager, and double-click the Help Project Editor icon.

When you first start the Help Project Editor, a blank, untitled Help Project Editor window opens (Figure 2.6).

Creating a New Help Project

If you have never used the Help Project Editor before, it will automatically start with a new, undefined project. But just to make sure, we’ll create a new project for this sample walk-through.

To create a new Help project file

nFrom the File menu, choose New Project.

Defining the New Project

After you create a new project, you define project-level information, including the title of the Help project, the context ID for the Contents topic, and the version of the Help compiler to use for the build.

To define the new project

1.1.From the Edit menu, choose Project.

The Project dialog box appears (Figure 2.7).

2.2.Type the following text in the Title box:

Sample Help File

This title will appear in the title bar of the built Help file.

3.3.Type the following text in the Contents box:

topic1_ID

We will use this context string to define both the Contents and the first topic in the Help file.

4.4.In the Help Version box, select the Help 3.1 option button.

This indicates that you want to use Windows Help version 3.1.

5.5.Choose OK.

Adding a Topic File to the Help Project

When you create a Help project file, you add all the topic files that you want to include in the Help file. For this sample Help file, we will create just one topic file.

To add a new topic file

1.1.From the Edit menu, choose Add New Or Existing File.

The Add New Or Existing File dialog box appears.

2.2.In the Directories box, double-click the Sample subdirectory.

Or press the UP ARROW or DOWN ARROW key to select the directory, and then press ENTER.

3.3.Type the following filename:

sample.rtf

4.4.Choose OK.

Since this file is new, the Help Project Editor asks if you want to create it.

5.5.Choose OK.

The Help Project Editor displays SAMPLE.RTF in the project window. Your screen should look like the one in Figure 2.8.

Creating the Topic File

To have a Help file, you must create topics. Topics contain the text and other information that appear in your Help file. You create topics using Word for Windows and the appropriate Help Authoring Template and then save the topics in a topic file. Once you add a topic file to the project, you can edit it without quitting the Help Project Editor.

To edit the sample topic file

nDouble-click SAMPLE.RTF in the Project Editor window.

Or select the file, and choose Edit File from the Edit menu.

The Help Project Editor starts Word for Windows and opens the sample file. Your screen should look like the one in Figure 2.9.

Note:

All Word for Windows screens in this guide are shown as they appear with Hidden Text and Paragraph Marks selected from the View Preferences (version 1.1) or the Tools Options (version 2.0) dialog box.

Creating Individual Topics

First you add all the topics that you want included in the Help file.

To create a new topic

1.1.From the Insert menu, choose Topic.

The Insert Topic dialog box appears (Figure 2.10).

Note The text boxes in the dialog box represent the topic footnotes supported by the Help compiler.

2.2.In the Title box, type the following text:

Topic 1

Each topic usually has a title. The title identifies the topic in the history list and in keyword searches the user performs.

3.3.In the Context String box, type the following text:

topic1_ID

Each topic usually has a context string. The context string identifies the topic within the Help file. For example, to jump to a topic you must provide the context string of the topic string to which you want to jump.

4.4.Skip Keywords, Browse Sequence, Build Tag, Entry Macro, and Comments.

5.5.Choose OK.

Your screen should look like the one in Figure 2.11.

6.6.Repeat steps 1 through 5 for Topic 2. However, substitute the number 2 for the number 1 (Topic 2, topic2_ID).

Your screen should now look like the one in Figure 2.12.

Inserting a Jump Hot Spot

Now that you’ve identified your two topics, you can insert a jump from Topic 1 to Topic 2.

To insert a jump

1.1.Create a new paragraph after the paragraph containing the words “Topic 1 Title,” and then type:

Jump to Topic 2

2.2.Select the text you typed in step 1.

3.3.From the Insert menu, choose Jump or Pop-Up Hot Spot.

The Insert Jump or Pop-Up Hot Spot dialog box appears (Figure 2.13).

4.4.Press TAB.

5.5.Type the following context string:

topic2_ID

6.6.Choose OK.

Your screen should look like the one in Figure 2.14.

Adding a Picture

The next step is to add a picture to one of your topics. Although you can add bitmaps directly to a topic, it is usually better to enter a bitmap reference that tells Windows Help the name of the bitmap file to display in the topic.

To insert a bitmap in the topic

1.1.Position the insertion point in the empty paragraph after the paragraph containing the words “Topic 2 Title.”

2.2.From the Insert menu, choose Graphic.

The Insert Graphic dialog box appears (Figure 2.15).

3.3.In the File Name box, type the following text:

sample.bmp

Note SAMPLE.BMP is one of the sample bitmaps provided with the Windows Help software.

4.4.Choose OK.

Your screen should look like the one in Figure 2.16.

Saving the Topic File

Now that you’ve created the topic file, save it as RTF.

To save your topic file and close Word for Windows

1.1.From the File menu, choose Save As.

2.2.In the File Name box, type this filename:

sample.rtf

3.3.Choose the options button.

4.4.From File Format, select RFT.

5.5.Choose OK to save the file.

6.6.From the File menu, choose Exit.

If Word for Windows asks if you want to save changes to SAMPLE.RTF, choose No. You already saved your changes in RTF format in steps 4 and 5.

Saving the Project File

Now you’re ready to save the Help project file.

To save the project file

1.1.From the File menu, choose Save Project As.

2.2.In the File Name box, type this filename:

sample.hpj

3.3.Choose OK to save the file.

Building the Help File

After you have created topics for your Help file, you use the Help Project Editor to define the build options. Depending on the complexity of the Help file you are building, the Help project file may have very little information or quite a lot. For this sample Help file, you won’t need to define any additional options. You are ready to start the build.

To start the build

nFrom the Compile menu, choose Start.

The Compilation in Progress window appears, showing the progress of the build and any errors that occur.

Displaying the Help File

After you build a Help file, you use the Help Project Editor to display it in Windows Help to test it and to make sure the features you added work correctly.

To display the sample Help file

nFrom the File menu, choose Run Help On SAMPLE.HLP.

The Help Project Editor displays the Help file in Windows Help (Figure 2.17).

As you can see, “Jump to Topic 2” appears in green, underlined text, indicating that it is a jump hot spot.

To test the jump

1.1.Move the mouse pointer over the green text.

Notice that the pointer changes to a hand shape with a pointing finger.

2.2.Click the left mouse button.

Your second topic appears, as in Figure 2.18.

The SAMPLE.BMP bitmap file appears below the “Topic 2” text.

Now that you have your Help file working, you can quit Windows Help.

To quit Windows Help

nFrom the File menu, choose Exit.

Quitting Help Author

Now that you have successfully created a sample Help file using Help Author, you can close the program.

To quit Help Author

nFrom the File menu, choose Exit.

Or double-click the Control-menu box.

If you haven’t saved your changes, the Help Project Editor prompts you to save the project file.