= Translating MFC Messages into Events = The messages are aggregated into events using a set of rules defined in XML. The order of the rules in the XML file defines their priority. == Single Messages and Sequences == There is a distinction between single messages and whole sequences of messages of the same type. The former may be used for, e.g., {{{WM_LBUTTONDOWN}}} and {{{WM_LBUTTONUP}}}: {{{ }}} Sequences of the same message occur, e.g., when scrolling: {{{ }}} The distinction is using the {{{multiple}}} attribute of the {{{msg}}} node, which is per default false. If it is true, it means ``at least one'', similar to ``+'' in regular expressions. == Storage of messages == Each message or message sequence can be stored for later use, e.g., comparisons with other messages or generating replays. This is done using the {{{store}}} and {{{storeSeq}}} nodes: {{{ }}} == Checking equalities == Only matching messages by their type is insufficient. Comparisons between their parameters are also required. This can be done using {{{equals}}} nodes: {{{ }}} 1. {{{winInfoValue}}}: information about the target of the message. - {{{}}} for the class of the target - {{{}}} for the HWND - {{{}}} for the resource Id. - {{{}}} for the target of the GUI objects parent 1. {{{msgInfoValue}}}: information about the type and target of the message. - {{{}}} for the type of the message (its integer) - {{{}}} for the target of the message (its string representation) The comparison of sequence variables is not yet implemented! == Generation of replay sequences == If a message sequence has been successfully matched to a rule, a replay sequence is generated. This is done using {{{genMsg}}} and {{{genMsgSeq}}} nodes. The first way to generate a replay message is to directly replay a message that has been stored during the matching phase: {{{ }}} The delay attribute signifies that the replaying tool pauses for 100 ms after sending the message stored in the variable ``clicked''. The second way is to ``construct'' it: {{{ }}} The type needs to be an integer. The target needs to be a target string. The LPARAM and WPARAM are both optional, their default values are 0. They can be either numerical or target strings. Furthermore, it is possible to define the HI and LO word of them separatly: {{{ value value }}} The value types are the same that can be used as terms for {{{equals}}} nodes. To generate message sequences, the {{{genMsgSeq}}} node is used: {{{ }}} The three value types used for equals are allowed. However, either the type or the target must be of a {{{seqValue}}}, otherwise the creation will fail. In case more than one {{{seqValue}}} variable is used, e.g., a different one for the LPARAM than for the target, both sequences must have the same length.