Semicolons Cannot Separate Macros in .HPJ FileLast reviewed: November 2, 1995Article ID: Q83020 |
The information in this article applies to:
SUMMARYThe author of a Help system can combine individual macro commands into a macro string, which the Microsoft Help Compiler processes as a unit. When the macro string is part of an RTF text file, the individual macros in the string are separated from each other with a semicolon character (;). The Help system runs the individual macros of a macro string sequentially. The author can define a macro string that is run when the user loads a Help file. This macro string is placed into the [CONFIG] section of the Help project (.HPJ) file. However, in the .HPJ file, the individual macros of the string are separated from each other with a colon character (:) because the semicolon character indicates the beginning of a comment.
MORE INFORMATIONIn the following sample [CONFIG] section, a macro adds two buttons to the Help window's button bar. The first button is labeled "Other", which when chosen brings up the About Help dialog box. The second button is labeled "Test". When chosen, it disables the "Other" button and jumps to the topic represented by "context_string." To create the "Test" button, two macros are concatenated to form the macro parameter in the CreateButton call.
[CONFIG] ; This first button is added so that the demonstration macro is ; complete. This macro just creates a button. Choosing the button ; brings up the About Help dialog box. CreateButton("other_button","&Other","About()") ; This macro also creates a button. Choosing the button disables ; "other_button", created above, and jumps to the topic represented by ; "topic_string." ; ; Note that the two macros in the CreateButton macro are separated by ; a colon, not a semicolon. ; ; NOTE: The following macro should appear on a single line. CreateButton("test_button","&Test","DisableButton(`Other_Button'): JumpId(`testhelp.hlp',`context_string')")
|
Additional reference words: 3.10 3.50 4.00 95
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |