Semicolons Cannot Separate Macros in .HPJ File

Last reviewed: November 2, 1995
Article ID: Q83020
The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK) version 3.1
  • Microsoft Win32 SDK, versions 3.5, 3.51, and 4.0

SUMMARY

The 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 INFORMATION

In 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
KBCategory: kbtool
KBSubcategory: TlsHlp


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 2, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.