|Home » Products » UltraEdit/UEStudio » Menu Commands (UE) » Macro|
Edit Macro command
Article Number: 1461 | Last Updated: Tue, Apr 2, 2013 10:22 AM
The Edit Macro command allows a new macro to be created and edited or an existing macro that has previously been generated with this command or with the Macro Record command to be edited.
In many cases, it is easier for the user to generate the macro by recording it with the Macro Record command and then to edit it if necessary. The learning curve is less with this approach.
A macro is a series of commands that may later be played back automatically to modify the file. The left hand side of the dialog shows the current macro being edited and an editable window containing the commands that make up the macro.
The commands in the macro must be one of the predefined commands. These predefined commands are shown on the right hand side of the dialog. If the mouse is double clicked on the command it is automatically added to the macro, or clicking on the arrow to the left of the commands will add it to the macro.
Many of the commands have numeric parameters. The numeric parameters are quite obvious, such as "GotoLine # #" or "GotoPage #". However, some of the commands such as Find and Replace, Sort etc. have additional parameters that are not numeric. These additional parameters are listed below the command list for easy selection.
Creating a New Macro
To create a new macro from this dialog click the New Macro button. This displays the Macro Definition dialog allowing you to define the macro name and hot key if required.
When this new macro is created, four macro commands are automatically added to the macro:
- Insert Mode or OverStrike Mode
- ColumnModeOn or ColumnModeOff
- HexOn or HexOff
- UnixReOff or UnixReOn or PerlReOn
These four commands are added based on the current state of the editor. The purpose is to establish a known state each time the macro is played. If a macro is recorded in one mode and played back in another the results may be unpredictable. Establishing the mode at the beginning of the macro helps to ensure the expected results are achieved. These commands may be modified as required.
Once a macro has been created, it may be edited. Please note, that "^c" and "^s" may be used with many macro commands and will be replaced with the contents of the clipboard (^c) and the text currently selected (^s) when used. This allows users to record a macro that may reference a specific string and replace this with one of these two items to allow the string to be dynamically "specified" as the macro is run.
Modifying The Macro
To modify the macro, commands may be typed directly into the macro edit box or selected from the command list. Commands are not case sensitive but must be spelled exactly as shown in the command list.
The table below shows the commands that may be added to any parameters:
There are no attachments for this article.
Warn on Exit if Macro not Saved cmd
Viewed 4721 times since Thu, Oct 13, 2011
Delete All command
Viewed 4335 times since Thu, Oct 13, 2011
Play Again command
Viewed 4256 times since Thu, Oct 13, 2011
Save All command
Viewed 3068 times since Thu, Oct 13, 2011
Set Auto Load command
Viewed 4903 times since Thu, Oct 13, 2011
Post Macro Record Options
Viewed 4139 times since Thu, Oct 13, 2011
Viewed 3460 times since Thu, Oct 13, 2011
Macro Definition Dialog
Viewed 4085 times since Thu, Oct 20, 2011
Stop Recording command
Viewed 4460 times since Thu, Oct 13, 2011
Viewed 4909 times since Thu, Oct 13, 2011