Is there a way to query an object in another app?

I would like to know if there’s a way to query another app’s object.

For example, in my app, I can write something like this:

Code Block
NSArray * myWindow = NSApp.windows;

to access all my app windows.

But what if I want to access the windows of another app?

Is there a way to query the classes or objects of another app?
Answered by Etresoft in 642446022
You would have far more success learning about the existing accessibility features of the operating system.
I'm looking for a way to help a visual impaired friend. We would like to write an app that would modify windows' title of other apps (at runtime) and also the main menu of other apps as well (the one on the menu bar).

As far as I'm concern, I don' think the macOS will let me do that. I've spend a fair amount of time reading and exploring classes but didn't succeed to find a way to do what I want.

That's why I'm asking here hoping an Apple engineer (or some knowledgeable folk) will give me a definitive answer without having me pay 99$ to become a member of the ADP to file a Technical Support Incident (TSI) or find another way to get an answer.

Thank you so very much to anyone who can give me a definitive answer.

Luke
Accepted Answer
You would have far more success learning about the existing accessibility features of the operating system.
Hi @EtreSoft,

I looked at accessibility features but didn't find a way to access windows of other apps not the main menu of other apps.

Did I miss something ??
Is there a way to query an object in another app?
 
 
Q