Copy link to clipboard
Copied
Dear experts,
My FindSomething function is quite successful. The found objects are always selected and hence I have a visible clue what was found. Three objects, however loose their selection as soon as the button function is left:
KLD_F.ButtonFind = function () { // =========================
var oTR, iFindType, iFS, iFV, iMode, sSearch, bWord, bCase, bBack;
// ...
$.bp(true);
oTR = KLD_F.FindSomething (iFS, iFV, sSearch, iMode, bWord, bCase, bBack);
if (oTR == undefined) {
alert ("Object not found");
return;
}
} //--- end of ButtonFind -----------------------------------
When stepping through the function the selection disappears as soon as I reach the last line.
What happens here?
Additional observations for AutoHyphen (2020-12-10 12:43)
Copy link to clipboard
Copied
For the 'non-indication of the automatic hyphen I have found a solution:
At the end of the find process - before leaving function ButtonFind - I issue a KB command "SelectPreviousCharacter". This makes the hyphen visible.
I have however not the tiniest idea how to handle the situation for a found Object tag or a found Object style override. Although I get a valid TextRange, its components are invalid:
Any input is highly welcome!