Trying to further improve a java script (for UE 28.20) I had written a few days ago. It occurred to me that the first script could not only merge text from another file into the main file (that worked fine), but also at the end pre-select the text lines I would then run my 2nd script on.
Trouble is, even when I select text in the active view, then run a dummy script:
that does pretty much nothing, the previous text selection is deselected when the script is done.
It took me quite some time to figure out that this was not an issue with the UE selection code, like
but the default behaviour of UE.
Is there a way to run a script that will select text, and then preserve that selection of text after the script has completed execution?
Thanks.
Trouble is, even when I select text in the active view, then run a dummy script:
Code: Select all
/*
* ae_test.js
*/
var ue = UltraEdit;
It took me quite some time to figure out that this was not an issue with the UE selection code, like
Code: Select all
var doc = UltraEdit.activeDocument;
doc.gotoLine(13,1); // Preselect all lines in the current block
doc.startSelect();
doc.gotoLine(17,1);
doc.endSelect();
// or better:
doc.gotoLine(13,1);
doc.gotoLineSelect(17,1);
Is there a way to run a script that will select text, and then preserve that selection of text after the script has completed execution?
Thanks.