I am not able to get the range of selected text in TextEdit application from my background application
问题 My application is agent type (running in background) and I have a button in window. when user select some text in TextEdit and trigger an action from my application I need to get the range of selection text. I am using below code but I am getting below error kAXErrorAttributeUnsupported I am using below code AXUIElementRef systemWideElement = AXUIElementCreateSystemWide(); AXUIElementRef focussedElement = NULL; AXError error = AXUIElementCopyAttributeValue(systemWideElement,