How to create a macro from a posted macro code?

Help with writing and playing macros

How to create a macro from a posted macro code?

Postby Mofi » Sat May 18, 2013 6:55 am

*.mac files for UltraEdit are binary coded files. You can't copy macro source code into a new text file, save it as *.mac and load it. Instead you have to

  1. copy my macro code to Windows clipboard,
  2. click in UltraEdit in menu Macro on Edit Macro,
  3. press button New Macro,
  4. enter a macro name,
  5. 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,
  6. let the macro property Continue if search string not found checked
    except the user who posted the macro code wrote to uncheck this property,
  7. close this dialog with button OK,
  8. select all commands in left field of the macro editor dialog with mouse,
  9. press Ctrl+V to replace the selected commands by copied macro source code,
  10. press button Close and confirm the question Do you wish to update the macro? with button Yes.
The macro is now ready for usage. You can execute it for example with Macro - Play Again, or by double clicking on the macro in the macro list view opened via View - Views/Lists - Macro List, or by selecting the macro in Macro - Play Any/Multiples times.

But you may save the macro first before running it. Use Macro - Save All (yes, a macro file can contain multiple macros) to store the compiled macro in a *.mac file.

Note 1: Prior UE vv13.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 strings is not found.

Note 2: The name and macro properties can be changed later in the dialog opened with Macro - Delete Macro/Modify Properties. Don't forget to use again Macro - Save All after making such modifications to store the changes.

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. With the text version the macro file can be recreated in this case.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4049
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Return to Macros