---
title: "Macros"
canonical: "https://docs.cuesystem.com/space/SSG/296189965/Macros"
format: markdown
---
## Overview

A macro is a sequence of commands. Every macro can contain various command types. Important features are as follows:

- A macro can be started by the button or by the event.
- The same macro can be started in several ways, e.g. by two buttons located on different keypads and by an event generated by external contact connected to digital input. This feature enables you to have one macro for the same functions started from different buttons or events. In other words, it is not necessary to copy a macro with the same functionality for different buttons or events.
- If a macro is started, commands are executed sequentially in the order set in the command table.
- **Only one macro can run at a time. **The Simple Setup is not a multi-tasking system.
- If you run a macro from one keyboard, another macro cannot run from that keyboard until the current macro is complete.
- If a macro is running and you run a macro from another keyboard, the macro is queued and runs when the running macro completes. Only one macro is queued from each keyboard.
- All event-triggered macros are also queued.
- If a macro is being executed or stored in a queue, it is not added to the queue again.
- For example, if you run the same macro from two different keyboards at the same time, the macro is executed only once.

## Basic interface

The basic macro interface looks like this:

![image](media://3ec9f669-6b86-4bcd-9580-3693f6063432)

In the list of macros, it is possible to select the macro you want to edit.

## Adding a new macro

Use the **New** button to create a new macro. A pop-up window is displayed.

![image](media://2c3f0b62-fdfd-4e61-bbfc-33db8f558bd7)

Fill in the name of the macro and press **Save**. The macro name must be unique among the macros. The new macro is added to the macro list and contains no commands.

## Editing the macro name

Select the macro you want to edit using the list of macros and press the **Edit** button. A pop-up window is displayed.

![image](media://b5f5fb4f-c096-4d72-ba32-63727b2a093a)

Edit the macro name and press **Save**. The macro name can be edited anytime and must be unique among the macros.

## Deleting a macro

Use the **Delete** button to delete a macro. If the macro is used in Layouts (connected to the button) or Events (connected to a specific event), it can not be deleted and the following warning is displayed.

![image](media://915b31c9-ca63-46ef-8f1b-56f03dd42a81)

If you still want to delete the macro, first it is necessary to disconnect it from Layouts as well as from Events.

## Adding commands

Every macro can contain the following commands:

- Wait
- Keypad indicators control
- Commands to control devices.

Select the macro where you want to add commands and use the button to add a specific command.

### Wait

Use the **Wait** button to add new wait command. A pop-up window is displayed.

![image](media://16116957-94e8-4b89-874f-c58b17345803)

Define wait time in seconds and press **Save**.

### Keypad indicators

Use the **Keypad indicators** button to add a new command which controls keypad indicators. A pop-up window is displayed.

Follow these steps:

1. First, select the appropriate layout where you want to control indicators. For better orientation, button labels created in the section Layouts are displayed.
2. Now select an action for each indicator
  - No action-indicator status is not changed.
  - On - the indicator lights up.
  - Off - the indicator goes off.
  - Blink fast - the indicator starts flashing quickly. The flashing stops using the indicator command On or Off.
  - Blink - the indicator starts flashing normally. The flashing stops using the indicator command On or Off.
  - Blink slowly - the indicator starts flashing slowly. Flashing stops using the indicator command On or Off.
3. Press Save to apply changes.

Indicators for one specific layout can be controlled by one macro command. If a project uses more panels with various layouts, a special macro command must be used for every layout.

### Controlled devices

Use the **Device** button to add a new command to control a device. A pop-up window is displayed.

![image](media://3ec32ad1-9714-4576-8248-1f2ff57382fb)

Follow these steps:

1. Select the appropriate device that you want to control. The device list contains all devices connected to the channels. The device names defined in the section Channels are used to identify the devices.
2. Select the command you want to execute.
3. Press Save to apply changes.

## Editing a command

Use the **Edit** button to edit a command used in the macro. A pop-up window appears depending on the command type and the command can be changed. Edit pop-up windows are the same as windows described in the section “Adding commands”. It is possible to change the parameters for a given command; it is not possible to change the command type. To change the command type, it is necessary to delete it and add a new one.

## Deleting a command

Use the **Delete** button to delete a command used in the macro.

## Changing the order of commands

Changing the order of commands is a very common requirement. The Simple Setup uses the drag-and-drop method that is very comfortable.

Follow these steps to change the command order:

1. Click on the command whose position you want to change.
2. Hold the left mouse button.
3. Move the command to a new position. The moved command is highlighted.
4. Release the left mouse button.

![image](media://950a70b7-fb93-446d-970c-9bcbe7804ed9)