## 10.1. Creating and Editing Macros

The easiest way to create and alter macros is from the World Editor, the place where all settings of a World are altered (see Chapter 4, Editing a World).

Macro are defined in the Macros section inside the Automation section. When you open that section, you'll see a list of the defined macros and some buttons like this:

Figure 10.1. The graphical Macro editor

The main part of the window is the list of defined macros. The columns are as follows:

- Enabled specifies whether the macro is enabled or not. Macros that are not enabled are not active and will not be run even if their key is pressed, but they remain in the list so that they can later be enabled again.

- Name is a name that is assigned to a macro. This helps you identify the macro's purpose and is useful when editing a macro via the command line (as described in Section 10.2.1, “Editing Macros”). Assigning a name to a macro is optional.

- Key is the key that activates the macro.

- Action is the action that is run when the key is pressed.

- Plugin: if this is non-empty, it means that the macro belongs to a plugin (and the name of the plugin is displayed). However, by default plugin macros are not displayed. See Section 4.7, “Advanced” for information on how to display plugin macros here.

### 10.1.1. Adding Macros

To add a new macro, press the Add button. This will open a window for you to edit the new macro's parameters:

Figure 10.2. The window to edit macros

What can be set represents the columns described above. To define the key, press the key combination desired in the text box for Key and the appropriate key code will be inserted.

When you are finished, press OK and the macro will be added. If you change your mind, press Cancel and the macro will not be added.

To see some things macros can do, read Section 10.2, “Defining Macros in the Command Line”. If you want to try the macros described there, you can create them from the World Editor.

### 10.1.2. Editing Macros

To edit a macro, select it by clicking its line in the list (the line will be highlighted), and press the Edit button. A window like the one used for adding macro (see Section 10.1.1, “Adding Macros”) will be opened, filled with the macro's parameters. Change what you want, and press the OK to commit the changes. If, however, you change you mind, press Cancel and the changes will be not be made, the macro will remain as it was before.

Another shorter way to edit a macro is to double click its line in the list.

It is also possible to change the value of the enabled option directly from the macro list. Make sure that the macro you want to change is selected, and click in the check button. The state will be toggled.

To delete a macro, select it and press the Delete button. You will be asked for confirmation, and can cancel the operation, but once deleted, you cannot recover the macro. If you want, you can disable this confirmation dialog, but if you do so and click the Delete button, the only way to undo your action will be creating the macro again. See Section 4.7, “Advanced”. To delete several macros at once, select them all and press Delete.

The final thing that needs to be explained with regard to macros is how to reorder them. Macros as tried from the first one to the last, so in a few cases the order might matter. To move a macro up or down in the list, select it and press the corresponding button.