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:

  1. Start Composer Pro and connect to a Director.
  1. Click Agents.
  2. (First time only) Click Add to add the Macros agent to the project.
  3. Select Macros, and then click OK.

To create a new Macro:

  1. Select Macros in the Agents pane, and click New.
  1. 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.

  1. Click the Programming view.
  1. In the Device Events pane, scroll down to Macros and select Bob. "When Screen Saver On is executed" appears in the Script pane.
  2. In the Device Actions pane, select Family Room and the Wall Lights.
  3. Under Light, select On.
  4. Drag the green arrow ‘Turn on the Family >Wall Lights' to the Script pane.
  5. Under Light, select Off.
  6. Drag the green arrow 'Turn off the Family > Wall Lights' to the Script pane.
  1. 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.
  2. 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.