Hi,
in powershell ISE, I want to displays the autoText menu below caret point, But it seems impossible to find the caret point location, in QM, there is the same problem
I tried another AutoText software, and it was easy to get it right, see below demo
I looked up some related materials and it seems that there is a solution in this article below, but I don't know how to use it
https://learn.microsoft.com/en-us/answer...-from.html
Related code:
Thanks in advance for any advice and help
david
in powershell ISE, I want to displays the autoText menu below caret point, But it seems impossible to find the caret point location, in QM, there is the same problem
I tried another AutoText software, and it was easy to get it right, see below demo
I looked up some related materials and it seems that there is a solution in this article below, but I don't know how to use it
https://learn.microsoft.com/en-us/answer...-from.html
Related code:
using UIAutomationClient;
var guid = typeof(IAccessible).GUID;
object accessibleObject = null;
var retVal = WinApiProvider.AccessibleObjectFromWindow(hwnd, WinApiProvider.OBJID_CARET, ref guid, ref accessibleObject);
var accessible = accessibleObject as IAccessible;
accessible.accLocation(out int left, out int top, out int width, out int height, WinApiProvider.CHILDID_SELF);
Thanks in advance for any advice and help
david