You can record macros in Dragonfly to automate frequently used commands or processes, which can help you save time by streamlining repetitive tasks. After you record a macro, you can play it back to perform all of the steps in the macro with a single action, unless a user input is required.
Macro Player dialog
The following controls are available on the Macro Player for recording and playing macros.
|
|
Icon |
Description |
|---|---|---|
|
New Macro |
|
Opens the Create Macro File dialog, shown below.
You can choose a name for the new macro, a save location, and to either create the file or to create the file and start recording. |
|
Import Macro |
|
Lets you import a macro file to the current user macro folder. |
|
View File |
|
Opens the current macro file. Note Macro files are written in Python and can be viewed and edited in a simple text editor or with a developer application such as PyCharm. |
|
Save As |
|
Saves the current macro as a new file. |
|
Save |
|
Saves any changes you made to the current macro. |
|
Reload |
|
Reloads the selected macro. Note You can reload a macro to discard any changes you made while editing the macro in the Macro Player dialog. Reloading a macro will also apply any changes you made to the macro file externally. For example, in PyCharm. |
|
Delete |
|
Deletes the selected macro. |
|
Record |
|
Begins recording. Note The Record button changes to Pause as soon as you begin recording. |
|
Pause |
|
Pauses recording. Note The Pause button changes to Record as soon as you pause recording. |
|
Play Single Step |
|
Plays the macro step-by-step. |
|
Play All |
|
Plays the macro, either to the end or to point that a user input is required. If the Automatically select the only occurrence when there is a single element available option is checked, the macro will automatically insert the required object or element when needed if no additional options are available. If multiple elements are available, the macro will wait for the required user input. |
|
Stop |
|
Stops playback. |
You can record macros in the Macro Player dialog to automate frequently used commands or processes. You should note that while it is possible to record a macro for almost any action that applies to Dragonfly, some features may be disabled when you are recording. This is because some actions require considerable user input and are too difficult to automate.
The Macro Player dialog opens.
The Create Macro File dialog appears.
Note When naming or renaming a macro, you should use a unique name whenever possible. However, you should note that each macro is assigned a unique identifier (UID) and unique names are not required.
AppData\Local\ORS\DragonflyXX\pythonUserExtensions\Macros folder on your computer.ProgramData\ORS\DragonflyXX\pythonAllUsersExtensions\Macros folder on your computer.
button when you have completed all the steps that you want to record.
This stops recording and saves all of the completed steps.
You can edit specific steps (see Editing Macros), execute the macro (see Executing Macros), as well as play back the macro (see Playing Macros).
Each step in a recorded macro includes its name or title and a brief description of the action to be executed. You can set steps to be executed automatically, to wait for user input, or to be skipped. You can also edit the parameters of each step in the Parameter editor.
You should that the Macro Player features an expandable tree view that lets you dive-into macro blocks extracted from object histories (see Extracting Object Histories) and for macros that call other macros. As shown below, you can expand a block to view each individual step within it.
Macro Player dialog
The following controls are available for editing the steps in a recorded macro.
|
|
Icon |
Description |
|---|---|---|
|
Execute |
|
When a macro step is set to Execute, the step will be executed automatically. |
|
Pause |
|
When a macro step is set to Pause, the macro will stop at the paused step and wait for a user input. |
|
Skip |
|
When a macro step is set to Skip, the macro will skip the step and continue playback. |
|
Delete |
|
Deletes the selected macro step. |
You can use the controls in the Parameter editor, shown below, to edit any step in a logged operation.
Parameter editor
The Macro Player dialog opens.
You can save your changes to the current macro file or create a new file.
After you record a macro, you can play it back. Playing back a macro automatically runs all of the interface actions you recorded using a single action, unless a user input is required.
The Macro Player dialog opens.
In this case, the Stop macro execution dialog will appear onscreen while the macro plays. You can choose to pause or stop the macro in the dialog.
Note If an input is required, it will appear at the bottom of the Macro Player, as shown below.
button when the macro is finished playing.After you record a macro, you can execute it from the Data Properties and Settings pop-up menu or from the View pop-up menu. Executing a macro automatically runs all of the interface actions you recorded using a single action, unless an input is required.
A number of configured actions and keyboard shortcuts are available for the Macro Player and Macro Builder. The default settings for these actions are listed in the following table.
|
Action |
Key |
Mouse |
|---|---|---|
|
Open the Macro Builder |
- |
- |
|
Open the Macro Player |
- |
- |