RoboHELP TipsMany errors you see in RoboHELP are actually winhelp problems. Make
sure you look at the Winhelp error page if you don't see your problem
listed here. Using macros Invalid Window names Using Multiple Build Tags
Adding a formatted table
Using macros To insert macros Macros can be a confusing topic. WinHelp macros are not the Word macros some of you can write. WinHelp macros are specific to
WinHelp and don't work in any other environment. Writing WinHelp macros is using a programming language, but don't let that scare you off. The basics are easy and you will rarely use any
thing more than the basics. However, you can do some really amazing things with just the basics. Regardless of the tool you are using to create WinHelp files, you can
add WinHelp macros to your help file in 6 places:
- Project (or help file level) start-up macros are run immediately whenever the .HLP file is opened.
- Window entry macros are run when a window is opened. Windows 95.
- Topic entry macros are run when a topic is opened.
- Contents tab macros are run when the user selects an entry from the Contents tab. Windows 95.
- Index tab macros are run when the user selects an entry from the Index tab. Windows 95.
- Macro hotspots are run when the user clicks a hotspot, such as a text hotspot, a help authorable button or, a hotspot in a shed graphic.
WinHelp 4.0 added some new macros. These do not run in 3.1x help files and RoboHELP won't let you select one of these to use if the target is 3.1x.
RoboHELP makes it really easy to use macros, especially at the topic level, which is where you will use macros the most. This article cannot go over all the macros. I strongly recommend
getting your hands on Mary Deaton's Designing Windows 95 Help book, which is not available any more. You may be able to find it with
used book sellers. To use macros at the topic level
- Click in a topic. Right-click and choose Topic Properties. Click the Advanced tab. Click the button at the bottom right. The Edit Help Macro Script dialog box appears.
- From the list at the bottom of the dialog box, select the macro you want to use.

- Click the Insert button. The macro appears in the text box in the upper left.
Since my help designs use a secondary window for procedures, I use CloseWindow() a lot to close open windows in 3.1x systems. I want the procedure window to close when the user leaves the topic so
that the wrong procedure is not on the screen in a topic. I name the procedure window Second, so in this case the syntax is CloseWindow(``Second"). In Windows 95 systems, this is handled at
the window level. But you can do this sort of thing at the topic level, if you want. In Windows 95, you don't need the quotes around the window name.
- After the macro you selected appears in the text box, you must complete the required parameters. RoboHELP shows you what kind of information goes in the parenthesis; it is up to you
to figure out what you want to put there. Fortunately, the help is very good on this. Select the macro you think you want to use and click the Help button.
After you have the macro in place, build your help and test it. I repeat, test it. You would not believe the results sometimes! It does what you told it but sometimes what you wanted wasn't what you got!
Invalid window names in older help
After you imported an older help file into RoboHELP, the compiler reports errors with window names but the names are correct. The window names are main and second.
The problem occurs because, although it shouldn't matter, the windows names are not in initial caps. They should be named Main
and Second. RoboHELP won't let you change them because it sees the name and ignores the case.
To fix this problem, close the project. In Notepad, open the hpj for the project. Scroll down to the window name section and change the case of the name. Open your project again. This should fix the
problem. If it doesn't—and I have seen it work or not—then just ignore the error. I know clean builds are fun but this one is not a problem. Using Multiple Build Tags You have a help file with several build tags and need to build the help
using several, but not all, of the build tags. Simple. In the Project Settings dialog box, click the Advanced tab. In the Build text box,
type BUILDTAG1 + BUILDTAG2, where BUILDTAG1 or 2 is the name of the build tag. Make sure that you include the space between the tag names and the plus sign or it won't work.
© 2000
Anthrobytes Consulting Hosted by
PageWeavers.com All trademarks belong to their respective owners. All opinions expressed are just that, opinions. Last modified Wednesday, 09 May, 2001. |