Using the Macros agent
Use the Agents and Programming views to program this agent. Macros agents are routines that associate programming with events.
Examples: You can create and name a macro to use in several different programming events.
The macro can be called from a particular program in the Programming Actions pane or you can create a custom button on your touch screens or on-screen Navigator to call a Macro .
You can create Macros:
- To use in various programmed events
- To use in Custom pages
- To use from custom buttons in the Navigators
Prerequisites
The following devices are added and identified (with a network address) in the project:
- Controller
- Light Switch
- Navigator with a screen (touch screen, Control4 app, TV screen, etc.)
- Any device involved in the triggering event (doorbell contact, keypad, etc.)
To set up the Macros agent:
- Start Composer Pro and connect to a Director.
- Click Agents.
- (First time only) Click Add to add the Macros agent to the project.
- Select Macros, and then click OK.
To create a new Macro:
- Select Macros in the Agents pane, and click New.
- Name the new macro, for example, Bob, and then click Create.
To add commands to the macro's programming script:
In this example script, you will select the Family Room Switch which is on, and then turn off everything in the Living Room.
- Click the Programming view.
- In the Device Events pane, scroll down to Macros and select Bob. "When Screen Saver On is executed" appears in the Script pane.
- In the Device Actions pane, select Family Room and the Wall Lights.
- Under Light, select On.
- Drag the green arrow ‘Turn on the Family >Wall Lights' to the Script pane.
- Under Light, select Off.
- Drag the green arrow 'Turn off the Family > Wall Lights' to the Script pane.

- You can add the Macros agent to many programs that you create if you want to perform similar tasks, or you can program the agent for a specific device. For example, you can assign this agent to a button on a keypad to run the program when executed.
Note: A unique Macro cannot be edited or copied; only created or deleted. If you want to create a new Macro based on another one, you must create a new one.