I want to use javascript to determine the character code of the cursor position and branch conditions.

Asked 1 years ago, Updated 1 years ago, 69 views

I'd like to use the macro (javascript) to determine the character code of the cursor and branch the conditions, but I can't find it even after searching, so please let me know.

emeditor

2022-09-30 17:47

1 Answers

Write the macro as follows: ch is populated with characters.

 document.selection.Collapse();// Unselect if a selection exists
varx = document.selection.GetActivePointX(eePosLogical);
variable = document.selection.GetActivePointY(eePosLogical);
var str = document.GetLine(y);
varch = str.charAt(x-1);
alert(ch);// Rewrite this line


2022-09-30 17:47

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.