Use these commands to repeat a portion of the macro any given number of times. Optionally choose to have a repeat counter placed within the repeat loop. Select form the drop down list the repeat option to use.
Start Repeat
To insert the start of a repeat in the macro, first select the location in the Enter Keystrokes edit field where the repeat should start. Next double click on Repeat from the list of commands. Click on the "Start Repeat" button and enter the number of times the macro should repeat into the Repeat Count box. Click on OK to save the settings. All macro commands after the Start Repeat are repeated until an End Repeat command is found.
Keyboard Express - Editor > Repeat
End Repeat
To insert the end of a repeat in your macro, select the location in the Enter Keystrokes edit field where the repeat is to end. Next double click on Repeat from the list of commands. Then click on End Repeat and OK to save. All macro commands after the Start Repeat are repeated until an End Repeat command is found.
Repeat Counter
A repeat counter may be placed inside a repeat loop. This action types via the keyboard the current count of the repeat loop. For example, if the macro is set to repeat 5 times and the only thing inside the repeat loop was the repeat counter, then when the macro is run in Notepad, it would type out "12345".
The repeat counter can be especially useful when creating a unique name for each repeat loop. For example, it may be necessary to save the results of each loop with a different name. To do this, set up a repeat loop and when saving out the file name, tack on the repeat counter to the end of the file name. This would create a unique file name for each repetition.
To insert a repeat counter into a macro select the location in the text where the counter should be located. It must reside between the "Start Repeat" and the "End Repeat". Next double click on Repeat from the list of commands. After clicking on the Repeat button, choose "Repeat Counter" and enter the number of leading zeros (if any) desired for the counter. A maximum number width of 4 (3 leading zeros) is supported.
Enter the Width of the Counter
If leading zeros are desired on counter values, then specify the "Counter Width". For example, to ensure that all values are at least 3 characters long, enter 3 for the width. This will produce 001, 002, etc.
The syntax for the repeat command with a counter would be:
<REPEAT:XXXX> This is my macro text. Repeated <I> times so far. <ENDREP> where XXXX is the number of times to repeat and "<I>" is a repeat counter.
Notes: 1. Repeat commands cannot be nested (placed inside of each other). 2. Repeat commands can also cause excessively long macros. Remember, there is a way to stop a macro!