Processing a Variable update action in a description
You should be aware of how the macro runtime processes one or more
Variable update actions when they occur in a <description> element:
- The macro runtime performs all the Variable update actions immediately, as if they were first in sequence.
- The macro runtime then evaluates the remaining items (descriptors) in the description as usual and arrives at an overall boolean result. The Variable update actions have no effect on the boolean result.
As you might remember, the macro runtime can go through the screen recognition process a number of times before matching a macro screen to an application screen (see Re-doing the evaluation). Therefore, if a <description> element contains one or more Variable update actions, then the macro runtime will perform the Variable update actions each time that it evaluates the <description> element.
For example, suppose that a macro is being played back, that the
screen name ScreenB is on the list of valid next screens, and that
ScreenB contains a <description> element like the one shown in Figure 1:
Figure 1. The <description> element of ScreenB
Each time that the macro runtime tries to match ScreenB to the
current application screen:
<description>
<oia status="NOTINHIBITED" optional="false" invertmatch="false" />
<varupdate name="$boolUpdate$" value="true" />
<attrib value="0x4" row="1" col="1" plane="COLOR_PLANE" optional="false"
invertmatch="false" />
</description>
- The macro runtime sees the <varupdate> action and performs it, storing the value true into $boolUpdate$.
- The macro runtime evaluates the <oia> descriptor and the <attrib> descriptor and arrives at a boolean result for the entire <description> element.