To create a Help file, use the following syntax:
HELPMAKE /E[[n]] /Ooutfileoptionssourcefiles
The /E option encodes a Help source file and creates a compressed Help database. The n is a decimal number that specifies the type of compression. If n is omitted, HELPMAKE compresses the file as much as possible (about 50 percent). The value of n is in a range from 0 through 15, which represents the following compression techniques:
Value | Technique | , |
0 | No compression | , | ||
1 | Run-length compression | , | ||
2 | Keyword compression | , | ||
4 | Extended keyword compression | , | ||
8 | Huffman compression | , |
You can add these values to combine compression techniques. For example, specify /E3 to get run-length and keyword compression. Use /E0 to create the database quickly during the testing stages of database creation when you are not yet concerned with size.
The /O option specifies a filename for the database. This option is required when encoding.
Additional options are discussed in the next section and in “Other Options”.
The sourcefiles field specifies one or more text files that contain Help source information.
The following options control encoding:
/Ac
Specifies c as a control character for the Help database. A control character marks a line that contains special information for internal use by the Help reader. Control characters differ for each Help reader. For example, the Microsoft Advisor uses a colon (:) to indicate a command, so you must specify /A: when building a Help file for use with the Advisor. HELPMAKE assumes /A: if the /T option is specified.
/C
Makes context strings case sensitive.
/Kfilename
Optimizes keyword compression by supplying a list of characters to act as word separators. The filename is a text file that contains a list of separator characters.
HELPMAKE can apply “keyword compression” to words that occur often enough to justify replacing them with shorter character sequences. A “word” is any series of characters that do not appear in the separator list. The default separator list includes all ASCII characters from 0 to 32, ASCII character 127, and the following characters:
!"#&`'()*+–,/:;<=>?@[\]^_{|}~
You can improve keyword compression by designing a separator list tailored to a specific Help file. For example, a number sign (#) is treated as a separator by default. However, in a Help file about the C language, you might want to have HELPMAKE treat each directive such as #include as a keyword instead of as a separator followed by a word. To encode #include and other directives as keywords, create a separator list that omits the number sign:
!"&`'()*+–,/:;<=>?@[\]^_{|}~
ASCII characters in the range from 0 through 31 are always separators, so you do not need to list them. However, a customized list must include all other separators, including the space (ASCII character 32). If you omit the space, HELPMAKE will not use spaces as word separators.
/L
Locks the Help file so that it cannot be decoded later.
/Sn
Specifies the type of input file, according to the following n values:
Option | File Type |
/S1 | Rich text format (RTF) |
/S2 | QuickHelp (the default) |
/S3 | Minimally formatted ASCII |
/T
Translates dot commands into internal format. If your source file contains dot commands other than .context and .comment, you must supply this option. The /T option is required if you want to use commands in the QuickHelp dot format. Dot commands are described on topic . HELPMAKE assumes the /A: option if /T is specified.
/Wwidth
Sets the fixed width of the resulting Help text in number of characters. The width is a decimal number in a range from 11 through 255. If /W is omitted, the default width is 76. When encoding an RTF source (/S1), HELPMAKE wraps the text to width characters. When encoding QuickHelp (/S2) or minimally formatted ASCII (/S3) files, HELPMAKE truncates lines to this width.
Example
The following example invokes HELPMAKE with the /V, /E, and /O options:
HELPMAKE /E /V /Omy.hlp my.txt > my.log
HELPMAKE reads input from the source file my.txt and creates the compressed Help database my.hlp. The /E option, without a compression specification, maximizes compression. The DOS redirection symbol (>) sends a log of HELPMAKE diagnostic information to the file my.log. You may want to redirect the output to a file when using /V because the verbose mode can generate a lengthy log.