Progress
Help Development
Guide


Help Macro Syntax

A help macro consists of a macro name and parameters enclosed in parentheses. Macro names specify the action to take, such as creating buttons or inserting menu items. Macro parameters specify the files, buttons, menus, or topics on which to carry out the action.

A help macro and all of its parameters cannot exceed 512 characters.

Help macros can be combined into macro strings by separating the macros with semicolons (;). The help compiler processes the macro string as a unit and execute the individual macros sequentially. Macros can also be used as parameters in other macros. In most cases, embedded macros must be enclosed in quotation marks.

Macro parameters must be enclosed in parentheses and separated by spaces. Parameters in many macros must also be enclosed in quotation marks. This is especially true if the parameter contains space characters.

Special characters must be preceded by a backslash (\). Special characters include double quotation marks ("), open and closed single quotation marks (‘ ’), and backslashes.

For example, the following code adds a menu item entitled “Yes \ No” to the “Options” menu:

AppendItem("MNU_OPTIONS", "Yesno", "Yes \\ No", "JumpHelpOn()") 

In Windows, the valid quotation characters are the matching double quotation marks (" ") and the open and closed single quotation marks (‘ ’). When a using a pair of single quotation marks, the first one must be the open quotation mark and the second one must be the closed quotation mark.

NOTE: The single open quotation mark is different from the single closed quotation mark. The single open quotation mark (‘) is paired with the tilde (~) above the TAB key on extended keyboards; the single closed quotation mark (’) is the same as the apostrophe.

If a quotation character is needed as part of a parameter, the parameter should be enclosed in single quotation marks. When using single quotation marks in this manner, you can omit the backslash escape character for the double quotation marks, as shown in the following example:

‘command "string as parameter"’ 

If the embedded macro also has quoted parameters, the quotation character that is used must be different than the quotation characters enclosing the macro. The following examples examples show two correct ways to use nested quotation marks:

CreateButton("time_btn", "&Time", "ExecProgram(‘clock’, 0)") 

CreateButton("time_btn", "&Time", ‘ExecProgram("clock", 0)’) 

In both examples, the quotation marks enclosing the “clock” parameter is different from the type of quotation mark used to embed the macro “ExecProgram.”

In help topic files, you can define a help macro in two ways:


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095