In the above code: Only when selecting text can the position of the text as the target be obtained. See below pic
I do not understand how the code in LA achieves obtaining the position of the text cursor when text is not selected
if (0 == e.get_CurrentAutomationId(out var ai) && ai.Find("Caret", true) >= 0 && 0 == e.get_CurrentControlType(out ct) && ct == UiaApi.TypeId.Custom) {
https://i.ibb.co/KG6cf4z/ccc.gif
I do not understand how the code in LA achieves obtaining the position of the text cursor when text is not selected
if (0 == e.get_CurrentAutomationId(out var ai) && ai.Find("Caret", true) >= 0 && 0 == e.get_CurrentControlType(out ct) && ct == UiaApi.TypeId.Custom) {
https://i.ibb.co/KG6cf4z/ccc.gif