02-02-2024, 07:59 AM
The LA code uses raw function names and signatures.
UIAutomationClient changes them to make simpler.
UIAutomationClient changes them to make simpler.
// script ""
/*/ nuget -\Interop.UIAutomationClient; /*/
using UIA = Interop.UIAutomationClient;
var uia = new UIA.CUIAutomation8Class() as UIA.IUIAutomation;
var e = uia.GetFocusedElement();
print.it(e.CurrentClassName);
var r = e.CurrentBoundingRectangle;
print.it(r.left, r.top, r.right, r.bottom);
//if you need RECT
RECT r2 = RECT.FromLTRB(r.left, r.top, r.right, r.bottom);
print.it(r2);