INMEMO is an ideal vehicle for building online help systems, because it automatically handles most of the difficult aspects of help systems: window oriented display, storage and retrieval of hundreds or thousands of text chunks varying widely in size, and easy updating at run time. As of Release 2.1, it also provides an indexing mechanism built into the memo file itself, so you don't need to maintain a separate index file. The only problem left is just sitting down to design how it will all fit together and writing the code. To make this vastly easier for you, we have provided a working prototype help subsystem designed to be ++include'd in your existing programs with minor revisions. The only requirements are that you provide the trap the help key in your input routine and pass the help keyword to the help subsystem, and that you have screen tracking (via the Tracker or an AM7x/AM65 terminal.)
The subsystem consists of the following modules:
HLPMMO.MAP
HLPMMO.BSI
HLPMMO.INI
MSBOXX.BSI
MSBOXX.SBR
JOBPAR.SBR
<A memo file to store the help screens>)
A sample program TSTHLP.BAS is also provided which uses the subsystem. Note that it references the help subsystem modules in the ersatz account HLPMMO: - you will have to set this up, although you can make it the same as your INMEMO: account.
Specific instructions for building the subsystem into your programs can be found by printing out the HLPMMO.BSI module. As a rough overview, you have to do the following things:
Use MAKHLP to create and initialize a help memo file. This is nearly identical to the regular MAKMMO program, except it sets up a special index memo at link 2, and a "help screen not found" memo at link 3
Use ++include to include the MAP and BSI files.
Customize the HLPMMO.INI file and call it within your program. This defines a number of options, such as the help file name, help screen coordinates, etc.
Specify a help keyword along with your field input parameters.
If you are using INFLD, you will want to put the keyword in the HLPIDX parameter.
Sense the designated help key in your input field routine and call the help subsystem, passing it the current keyword.
Once you have done this, you can run your program to start building the help screens. When you hit the designated help key, the help subsystem will look in its index to see if the specified help keyword is known. If not, it will ask you if you want to create a help screen for that keyword. If you say yes, it will then open up a memo window and allow you to type. When you exit, it will save the help memo and update the index, so that the next time you hit the help key with the same keyword, it will then bring up the existing memo.
If you want to see what other help screens are available when you are looking at one, hit the help key again. This time it will display the help index menu and put you in menu mode, allowing you to use the light bar to select another help screen. Since the index is sorted, systematic naming of your help screens will result in a system that is very easy to navigate.
Security: The ability to add or edit help screens as opposed to just displaying them is determined by comparing your current experience level (defined by MUSER.LIT in the USER.SYS file and returned by JOBPAR.SBR) against the MH'SCRTY variable which is initialized in HLPMMO.INI. If you just get the message that the help screen does not exist, without an option to add one, then try bumping your experience level up using MUSER.LIT or lowering the MH'SCRTY value.