Chapter 9. Conditional macros 275
9.1.1 Recording conditional macros
The general procedure for recording conditional macros can be summarized as
follows:
1. Record one path through the macro. This will be the main path in your
application.
2. Put the connection in a different state, then replay the macro and cause the
alternate condition to occur. Another way to cause an alternate condition is to
specify a different value for an input prompt.
3. Host Access will report that a unexpected screen was encountered and
display the Macro Play Error window. Click Record an alternate path in the
Macro Play Error window.
4. Record the keystrokes you take to move from the new screen back to the
main path of the macro, then stop recording. You might have several screens
to define before you return to the macro. One way to get back to the main path
is to highlight the last step in the conditional path and then click Jump to
defined screen on the toolbar (see Figure 9-2). In the window that appears,
select the name of the screen in the main path you want to use as the
destination for the jump. You must have already defined the screen before you
can select it to be the destination of a jump.
Figure 9-2 Host Access toolbar
Note that you can have several conditions for one step of a macro; for example,
one screen might have several screens associated with it in the macro tree. Each
screen that you define has actions associated with it. When you play your macro
and Host Access encounters one of the possible screens you specify, it performs
the actions associated with that screen.
In the macro tree, the actions and the next screens associated with a screen are
indented under the screen’s entry.