*.mac files for UltraEdit/UEStudio are binary coded files. The macro source code can't be copied into a new text file, saved as *.mac and loaded.
Instead you have to
But you may save the macro first before running it. Use Macro - Save All (traditional menus) (yes, a macro file can contain multiple macros) to store the compiled macro in a *.mac file.
Note 1: Prior UE v13.10a+2 and UES v6.30a+2 the macro property Continue if search string not found was named Continue if a Find with Replace not found. But that name was not correct as this property controls in all versions of UE and UES exit or continuation of macro execution when a searched string is not found.
Note 2: The name and macro properties can be changed later in the dialog opened with a click
Note 3: It is advisable to store the code, the name and the properties of the macro additionally in a text file for example with the file extension uem (syntax highlighting available for *.uem files) in case the binary macro file becomes corrupt (storage failure) making it impossible to load it. The macro file can be recreated in this case with the text version.
Instead you have to
- copy the macro code selected in browser window to (Windows) clipboard;
- switch to UltraEdit/UEStudio and click
in menu Macro on Edit Macro with using UE/UES with traditional menus, or
in menu Advanced in submenu Configure on Edit macro with using UE/UES with contemporary menus, or
on ribbon tab Advanced in group Macro on down arrow of Configure and click in pop-up menu on Edit macro with using UE/UES in ribbon mode; - press button New Macro;
- enter a macro name;
- uncheck the macro property Show Cancel dialog for this macro,
except you want to be able to cancel the execution of the macro later by mouse; - let the macro property Continue if search string not found checked,
except the user who posted the macro code wrote to uncheck this property; - close this dialog with button OK;
- select all commands in left field of the macro editor dialog with mouse (or with Ctrl+A if used version of UE/UES supports it);
- press Ctrl+V to replace the selected commands by copied macro source code;
- press button Close and confirm the question Do you wish to update the macro? with button Yes.
But you may save the macro first before running it. Use Macro - Save All (traditional menus) (yes, a macro file can contain multiple macros) to store the compiled macro in a *.mac file.
Note 1: Prior UE v13.10a+2 and UES v6.30a+2 the macro property Continue if search string not found was named Continue if a Find with Replace not found. But that name was not correct as this property controls in all versions of UE and UES exit or continuation of macro execution when a searched string is not found.
Note 2: The name and macro properties can be changed later in the dialog opened with a click
- in menu Macro on menu item Delete Macro/Modify Properties on using traditional menus, or
- in menu Advanced in submenu Configure on menu item Configure macros on using contemporary menus, or
- on ribbon tab Advanced in group Macro after a click on arrow of Configure on popup menu item Configure macros on using ribbon mode.
Note 3: It is advisable to store the code, the name and the properties of the macro additionally in a text file for example with the file extension uem (syntax highlighting available for *.uem files) in case the binary macro file becomes corrupt (storage failure) making it impossible to load it. The macro file can be recreated in this case with the text version.