Determining when the recognition limit is reached
The macro runtime keeps a recognition count for every macro screen that includes a <recolimit> element. When macro playback begins the recognition count is 0 for all macro screens.
Suppose that a macro includes a macro screen named ScreenB and
that ScreenB contains a <recolimit> element with a recognition
limit of 100. Each time the macro runtime recognizes ScreenB (that
is, each time the macro runtime selects ScreenB as the next macro
screen to be processed), the macro runtime performs the following
steps:
- The macro runtime detects the presence of the <recolimit> element inside ScreenB.
- The macro runtime increments the recognition count for ScreenB.
- The macro runtime compares the recognition count with the recognition limit.
- If the recognition count is less than the recognition limit, then the macro runtime starts performing the action elements of ScreenB as usual.
- However, if the recognition count is greater than or equal to the recognition limit, then the macro runtime performs the action specified by the <recolimit> element. In this case macro runtime does not process any of the action elements in ScreenB.