OSX Accessibility - How to bring a window allll way to the front?

I am using the osx accessibility API to try to bring the window to the forefront. The documentation states that kAXRaiseAction"Simulates the input of a window forward by clicking it in the title bar"

AXUIElementPerformAction(myWindowRef, kAXRaiseAction);

Except for this, no ... It only brings the window forward, transfers all the windows of the same application, which does not happen when you click the application title bar.

When I actually click on the Finder window (one of many), it comes all the way forward, transfers windows of all other processes, without bringing any other search windows with it.

How can I simulate this behavior?

https://developer.apple.com/library/mac/documentation/UserExperience/Reference/Accessibility_RoleAttribute_Ref/Actions.html

+3
source share
1 answer

You can select a window, as you already did, and then activate the application using -[NSRunningApplication activateWithOptions:].

+2
source

All Articles