- AuthorPosts
- November 19, 2020 at 7:43 am #27180LTTParticipant
I’m afraid SetActivePoint(…, iSel) is not working properly yet.
Make some selections and test with this macro:
ss = "Active~ ▼ Active ▼ Top - Bottom\n\n"; for(ii = 1; ii <= document.selection.Count; ii++){ xPos = document.selection.GetActivePointX(eePosLogical, ii) + 1; yPos = document.selection.GetActivePointY(eePosLogical, ii) + 1; // document.selection.SetActivePoint(eePosLogical, xPos, yPos, true, ii); ss += xPos + "," + yPos + " ▲ " + document.selection.GetActivePointX(eePosLogical, ii) + "," + document.selection.GetActivePointY(eePosLogical, ii) + " ▲ " + document.selection.GetTopPointX(eePosLogical, ii) + "," + document.selection.GetTopPointY(eePosLogical, ii) + " - " + document.selection.GetBottomPointX(eePosLogical, ii) + "," + document.selection.GetBottomPointY(eePosLogical, ii) + "\n"; } alert(ss);
** Error occurs if the SetActivePoint line is enabled.
November 20, 2020 at 10:30 am #27183Yutaka EmuraKeymasterI will fix this issue on the next version. Thanks!
November 25, 2020 at 2:53 am #27194LTTParticipant20.3.901
Text:
aaa bbbSelect “aaa” and “bbb”. (2 selections.)
Run this macro:
xPos = document.selection.GetActivePointX(eePosLogical, 1) + 2;
yPos = document.selection.GetActivePointY(eePosLogical, 1);
document.selection.SetActivePoint(eePosLogical, xPos, yPos, true, 1);** Error occurs (where the selections should merge).
December 2, 2020 at 11:52 am #27206Yutaka EmuraKeymasterThis will be fixed on v20.3.902. Thank you.
February 27, 2021 at 8:57 pm #27349LTTParticipantupload.ee/image/12944206/EmEditor_SetActivePoint.png
Set 2 points (as shown in the upper image).
Run the macro:
for(ii = 1; ii <= document.selection.Count; ii++){
xPos = document.selection.GetActivePointX(eePosLogical, ii) + 1;
yPos = document.selection.GetActivePointY(eePosLogical, ii) + 1;
document.selection.SetActivePoint(eePosLogical, xPos, yPos, true, 1);
}What I expect is shown in the lower image. (This can be achieved by manually dragging the border of each point/selection.)
** But the result in EmEditor is not correct, and error occurs.
April 7, 2021 at 1:53 pm #27401LTTParticipantIn case you didn’t notice the last issue.
The new URL for the image:
upload.ee/image/13033181/EmEditor_SetActivePoint.pngApril 9, 2021 at 10:59 am #27404Yutaka EmuraKeymasterHi LTT,
The macro should be written as this:
(the 5th parameter ofSetActivePoint()
should beii
)for(ii = 1; ii <= document.selection.Count; ii++){ xPos = document.selection.GetActivePointX(eePosLogical, ii) + 1; yPos = document.selection.GetActivePointY(eePosLogical, ii) + 1; document.selection.SetActivePoint(eePosLogical, xPos, yPos, true, ii); }
- AuthorPosts
- You must be logged in to reply to this topic.