The secret to adding menu items is knowing a few of the internal components that make up the menu system of a Help file.
The right click menu is identified to the Help system as mnu_floating.
You can add a new menu item to the mnu_floating ID using the AppendItem() macro.
Try this:
On the RoboHELP Explorer choose File: New: Startup Macro.
Type in the following macro exactly as it appears below without spaces, except for `Bookmark Topic...' which can have spaces between words:
AppendItem(`mnu_floating',`itm_bookmark',`Bookmark Topic...',"BookmarkDefine()")
Here's the macro and a breakdown of each parameter.
AppendItem("menu-id","item-id","item-name","macro")
|
Item |
Explanation |
|
AppendItem |
WinHelp macro: abbreviated as AI, this WinHelp macro is used to add menu items at the end of existing menus. |
|
`mnu_floating' |
Menu-id: The identifier used by Help to ID the menu. In this case the Floating menu. |
|
`itm_bookmark' |
Item-id: The identifier of our choice to name the menu item being added to the Help system. |
|
`Bookmark topic...' |
Item-name: The text that appears on the menu. |
|
`BookmarkDefine()' |
Macro: The WinHelp macro that executes when the menu item is selected. Whenever you see parameter "macro" it means you must "nest" a macro within another macro. Here we nest the BookmarkDefine() macro as the 4th parameter of AppendItem |
Note the quotation marks. You can use either double quotes ("double quotes") or single quotes (`grave opens, apostrophe closes').
Next: Add BookmarkMore() to the "Floating" menu