Context-Sensitive Help



About Context-Sensitive Help

In these lessons, you'll see how to create context-sensitive help with an online-help authoring tool, specifically with RoboHelp. The concept will be the same for other help-authoring tools, but the implementation will be different.

To this point, you've been creating what could eventually become application help. That's the help window that pops up when you click Help somewhere at the top of the window containing the software application you are using.

When you deliver application help, you simply provide the programmers with the CHM file (or whatever it is being called now) you have built and compiled; the programmers set things up in the software application to make your help file pop up when the user clicks Help or presses F1.

Context-sensitive help is help that is "sensitive" to the particular context the user is in in a software application. In this illustration, a user has clicked Format > Cells in Microsoft Excel, but needs information on how to work with the dialog. The user clicks the ? in the upper right corner of the dialog box then clicks on a control somewhere in the dialog box. (Or the user can press F1 with the dialog box open and active.) The context-sensitive help then pops up.

Creating context-sensitive helps is tricky business. You'll go through the process using a very simple example.

Create Context-Sensitive Help

In this first part, create application-level help:

  1. Place this simple executable file in a directory somewhere on your computer: simple_app.exe. This dumb little program does next to nothing, but it will help you get a sense of application-level and context-sensitive helps.
  2. Double-click the simple_app icon to run the program. Click on its help and click I Need Some Serious Help. You should get an error because the help file is not available. Epro.exe is looking for a help file with the extension chm in its same directory (folder) level.
  3. Download this help-project file, simple_app.zip into the same directory and unzip it into the same directory. (The directory will now contain pp8.chm.)
  4. Move pp8.chm to your desktop. CHM files don't have to be located on the desktop; in fact, that's a totally bad place for them. Normally, CHM files are located with the program files of a software application.
  5. Run the program (simple_app.exe) and try viewing the help again. You will not get that error because the .chm is right there with the .exe file in the same directory.

In this second part, you create context-sensitive help. Application-level gives you help for the entire software application—everything. Context-sensitive help gives you help for a specific dialog. Actually, RoboHelp and others make a further distinction. Window-level help, which is what you are about to create, provides help for a specific window (or dialog, in this case). Field-level help (for which a tutorial here is not ready yet) provides help for specific fields or other objects within a window or dialog.

One of the first things to do is to set up the map ID in the help project. Remember that a map ID in your help project corresponds to an ID in the software program. You have to get together with the software developers to agree on these IDs.

  1. Open the simple_app project (click the .mpj file in directory you unzipped simple_app.zip. It was developed in RoboHelp HTML version 9. Click Upgrade when RoboHelp 7 asks you whether to upgrade. This same project may open in other help-authoring applications.
  2. Click the Project Setup tab.
  3. Click the Context-Sensitive Help folder.
  4. Click the Map IDs folder.
  5. Right-click BSSCDefault.h file and select Edit Map IDs (or just double-click the file).
  6. Click the Create/Edit Map ID icon at the bottom of the Map IDs area.
  7. In the dialog, enter HID_NEW_EMP_INFO as Topic ID; enter 2154169330 as the Map number.
  8. Click OK.

You have to associate this Map ID with a specific topic. In this case, you'll create a new topic for that purpose:

  1. Click the Create a New Topic icon.
  2. For Topic Title, enter New Employee Information.
  3. For file name, enter newemp.htm.
  4. Type over Type Topic ext gere the following help text:

    The New Employee Information dialog is used to add new employees to IconLogic. The fields in this dialog should be explanatory except for the Employee ID. Get the ID from the HR director and enter it here. The rest of the information can be found on the new employee's CR-162 form.
  5. Save this new topic.

To associate the new topic with the map ID you created (which is a code inside the software program):

  1. Go back to the Project Setup tab, the Context-Sensitive Help folder, and the Map IDs folder.
  2. Double-click BSSCDefault.h.

  3. In the Edit Map IDs dialog, click to select New Employee Information in the Topic area; select HID_NEW_EMP_INFO (that map ID you created) in the Map IDs area.
  4. Click Assign.
  5. Click Close.

Now you are all set to save this project, generate a new CHM, and test this windows-level context-sensitive help.

  1. Save all the files in this project.
  2. Generate the CHM. (Remember it gets tucked away in !SSL!/Microsoft_HTML_Help.
  3. Copy the CHM file out to your desktop. Remember that normally you wouldn't do this. Normally, the CHM goes in the directory containing the files for the software application.
  4. Double-click that EPro.exe program file, which is still in the directory where you unzipped all the files from simple_app.zip.
  5. In the program window, click File > New.
  6. Press F1. You should see the new topic you created with context-sensitive help related to this specific dialog!

In this third part, create what's-this help:

  1. One of these days . . .

Contact Your Instructor

Let me know if this worked okay!



Provided by hcexres@prismnet.com.