====== Macros ====== A Macro is a group of [[software:gui-designer:system-manager:commands|Commands]] to be fired in sequence, each with an adjustable delay.\\ A macro can be made of up commands from any system in your project, allowing you to control multiple devices from a single button press. ===== Using Macros ===== A Macro can be used in the following plages: * [[software:gui-designer:buttons#Basic-Actions|Basic Button Actions]] - Drag a macro onto a button. * [[software:gui-designer:advanced-button-actions|Advanced Button Actions]] - assigned via Button Properties * [[software:gui-designer:timers|Timers]] - Assigned by right clicking the page or subpage and choosing 'Manage Page Timers...' * [[software:gui-designer:gestures|Gestures]] - Assigned in the Gesture Manager. {{:software:gui-designer:system-manager:macro_properties.png?nolink|}} ==== Delay ==== The delays in a Macro are additive. For example, if a Macro had the following delays set and was assigned to a [[software:gui-designer:buttons|Button]]: - 0ms - 100ms - 2000ms Then the first command would fire instantly, followed 100ms later by the second command. The third command would fire 2100ms after the button was pressed. ==== Command Name ==== This defines which command will be fired. Note that Macros cannot contain other Macros. This was done to prevent any accidental macro looping. ===== Managing Macros ===== {{:software:gui-designer:system-manager:guidesigner_system_manager_macro.png?nolink|}} ==== Create New Macro ==== To create a new Macro, press the (1)''Create New Macro'' button in the [[software:gui-designer:system-manager|System Manager]] toolbar.\\ The Macro Properties dialog will then be shown, and after the Macro is created it will be added to the bottom of the System Manager tree along with other Macros in alphabetical order. ==== Edit a Macro ==== To edit an existing macro. Press the (2) ''Edit Macro'' button. The Macro properties dialog box will be shown for the macro you selected, you can then make changes as required. ==== Ordering Commands in Macros ==== To change the order Commands are fired in Macros, simply select the command row you want to move by clicking in the Delay property of the adjacent command, then press the Up or Down arrow buttons in the toolbar. ==== Deleting a Command from a Macro ==== To delete a Command, first select it (using same method as for ordering commands) then press the red X in the toolbar.\\ The Command will then be removed from the Command list. ==== Undo Macro Changes ==== At any time during editing a Macro, you can reset the macro back to how it was before editing by clicking on the 'Reset' button (or pressing cancel and editing the macro again).\\ Pressing cancel at any time will cancel any changes made since opening the Macro Properties dialog. ==== Saving Changes ==== Press the OK button at any time to save the changes made to the Macro.