Organize Macros

(available in EditPad Pro only)

Select Organize Macros in the Macros menu to organize, play back and record macros.

Repeated Playback

Playing back a macro via the Organize Macros allows you to play back the same macro many times. Simply enter the number of times the macro should run in the Repeat box, and click the Play Macro button. The macro may run fewer times than you specified, but never more.

If the macro includes a search command, and the search fails to find a match, macro playback will stop immediately. This enables you to record a macro that does something to a search match, and then run that macro on all search matches. Suppose you record a macro that executes the Search|Find Next command and then the Edit|Delete Line command. If you then execute this macro with Repeat set to 100, the macro will delete the lines containing the next 100 search matches. If there are fewer than 100 search matches, all their lines will be deleted, and the macro will stop. You can use the Search|Count Matches command to determine the number of times the macro should run, or you could simply enter a large enough number.

However, there is a reason why you still need to enter an upper limit for the number of times the macro should run. You can't tell EditPad Pro to run the macro until the search fails. The reason is that it's quite possible for a search command to never fail. E.g. a macro that runs Search|Find First but doesn't delete the search match will always find that search match. A macro using Search|Find Next with the "loop automatically" option turned on will loop forever if it doesn't delete search matches. By specifying a reasonable number of times for the macro to repeat itself, you can prevent it from going on forever.

Recording

Click the Record button to record a new macro. EditPad Pro will ask you to enter a name for the macro. When you confirm the macro's properties, the Organize Macros screen closes and recording begins immediately. There are a number of important issues to keep in mind when recording macros. Make sure to review them.

When you're done recording the macro, select the Stop Recording item in the Macros menu. You'll notice it's the only available command during recording. You cannot play back and record macros at the same time.

Organizing Macros

Click the Properties button to rename a macro or to change its shortcut key, or to rename a folder. You can add folders with the New Folder button. To put macros into a folder, simply drag and drop them with the mouse. If you have a lot of macros, organizing them in folders makes it easier to find them later.

Import and Export

EditPad Pro automatically saves all your macros internally along with your preferences, history lists, etc. If you want to share a macro with other people, or copy it from one computer to another, use the Export Macro button. The selected macro is then saved into the file that you specified. You can open the file in EditPad Pro to view its contents if you like. However, macro files are not intended to be edited.

If you've received a macro that you'd like to run in a file, first import it with the Import Macro button. The macro is then added to your list of macros. You can play back imported macros just like macros that you recorded yourself. The macro file is no longer needed once you've imported it.

You can export multiple macros into a single file by selecting multiple macros before clicking the Export Macro button. If you include one or more folders in your selection, all the macros in those folders and their subfolders will be exported. If you click the Export Macro button a second time and select an existing file, EditPad Pro will replace that file rather than append to it. When importing a file that holds more than one macro, all of the macros will be imported. If you wanted to import only some, you can delete the extraneous ones after importing the file.