How do you write in macros in EmEditor to go down one line at a time in blue selection?

Asked 1 years ago, Updated 1 years ago, 51 views

How do you write in macros in EmEditor to go down one line at a time in blue selection?
I'd like to do macro processing on a row-by-row basis in between.

editor.ExecuteCommandByID (4154);

Or
editor.ExecuteCommandByID (4437);
document.selection.LineDown(true,1);

In this macro, I was able to go down with one line selected by the arrow key, but the previous line selection is not missed, so when I press the arrow and the next line is selected, I want to leave the previous line unchecked.

Enter a description of the image here

The macro you want to do is

In combination with this
editor.ExecuteCommandByID (4199);

US>Select row by row to handle logical row macros
Select one line → re-translate macro execution → loop this until the last line is reached

Because of this, it will be a problem if the selection range of the previous line is not removed when it goes down.
Thank you for your cooperation.

emeditor

2022-09-30 14:32

1 Answers

You may want to add the method Collapse() that you want to deselect first, as follows:

 document.selection.Collapse();
document.selection.LineDown(true,1);


2022-09-30 14:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.