The Flag step is used to keep track of system status and act based on that status. There are multiple flags available, which you can set or clear under macro control. Later, you can use the "Test Flag" option to take different actions based on whether or not a certain flag is set. For example, you can use this functionality to make discrete power ON and OFF macros for components for which you have only toggle codes. Use the "Set Flag" option when you turn on the component, the "Clear Flag" when you turn it off, and the "Test Flag"option before you send out the Power code. Keep in mind that flags exist on a per-device basis. Flag 001 on one interface device is not related to Flag 001 on the control processor. A macro can set, clear, and test only those flags within the device it is running on. In particular, this means that System macros and Standalone macros will operate on a completely different set of flags.
The following is an example of using flags to simulate discrete on and off commands for an Infocus projector, using the toggle power code.
Go to the macro editor on the button you wish to create the "power on" command. Select the"Flag" option from the command type list of the Macro Editor. When the Flag option has been selected you will see several options appear for Flag Operation. Select the "Test Flag"bullet, and then drag the command into the macro by left clicking on the "Drag this icon" box in the bottom right of the Macro Editor. Next, insert the toggle power command within the brackets of the test flag, AFTER the "else" bracket.
Bullet the "Set Flag" option within the Flag Operation box. Drag the set flag command into the macro, and place it immediately after the power command. Click "OK" to close the macro editor.
Go to the macro editor on the button you wish to create the "power off" command. Set a"Test flag" as was done in Step 1. Place the toggle power command BEFORE the "else"bracket.
Bullet the "Clear Flag" option within the Flag Operation box. Drag the clear flag command into the macro, and place it immediately after the power command. Click OK to close the macro editor.
You now have a macro that will simulate discrete "on" and "off" commands even though only the toggle IR code is available. Note that the power command will not be sent on the"Plug On" button unless the corresponding flag for the projector has been cleared, indicating the power is currently off. Similarly, the power command will not be sent on the "plug off"button unless the flag is set, indicating that the power is currently on.