Support for Macros (JOE style)

Code Writer App Suggestions and Support Forum

Posted 11 years ago by Aaron W. Hsu
Avatar

The JOE editor allows for up to 10 macros to be easily recorded and run. Two keyboard shortcuts start and stop macro recording. When starting a recording session, a number 0 - 9 is selected, which is the id of the macro. Once recording has ended, the same set of editor actions as recorded can be repeated by running the keyboard shortcut for the id of the macro in question. In Jstar mode, ESC-( and ESC-) start and stop recording of the macros, while ESC-<num> will activate the macro <num>.

Comments (2)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Aaron,

Thanks for the suggestion.  Can you elaborate on what sort of things you typically use macros for?


Actipro Software Support

Posted 11 years ago by Aaron W. Hsu
Avatar

Sure. Just recently I needed to use another editor than Code Writer to solve a problem because my editing task was both interactive, but semi-automatable through Macros. I was editing a series of XML tables in DocBook, which look somewhat similiar to HTML tables. I ended up having 8 or more macros that I used to do various operations on these tables. They were roughly as follows:

 

1. Wrap a given character in a specific tag and move past the end of the closing tag by two spaces to get to the next character. This allowed me to write out a series of characters that all had to be wrapped individually in a tag and do it quickly by repeating this macro some number of times.

2. Take a persistent selection and paste it to the current cursor location, and then move down one rwo to the equivalent column in the next logical row in the table.

3. Take a persistent selection consisting of three columns in a single logical row and replace the three columns starting on the current line with the persistent selection.

4. Find the next table which needs operation, and set a bookmark at the beginning of the table for preparation.

5. Take the current persistent selection and insert it between some elements in each of the first column of the tables, followed by filling out the other columsn based on specific elements from other columns which match a pattern, finally ending with the cursor at the first of two rows which could ot be automatically edited.

6. Remove a specific set of rows which no longer were necessary based on their content through find and replace and some other operations, leaving the final cursor at a specific, predictable location afterwards.There were two such macros of this style.

These were just the ones that I used for this particular editing task, and it saved me possibly days worth of work. However, the macros themselves don't work without predicatable operations that I can use, such as a persistent selection that I can programmatically operate and control that does not require mouse input and stays around between operations as I am doing them.

The latest build of this product (v4.2.42) was released 3 years ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.