开发者

get text from running application window (osx)

I'm very very new to OSX/UNIX and i was wondering how i would go about getting a certain text from a application window.

Explanation: App1 is running, it has a textfield with changing data. I start app2 and i want the data in the textfield from app1开发者_如何学运维 available in app2. (i did not write app1 its a commercial app)

I guess it should probably be done in c++ but any other solutions are welcome.

If someone could help me in the right direction it would be much appreciated!

Thx!


Your best bet is to look at the accessibility API. An accessibility client can use the descriptions and accessibility hierarchy of the views in an app to find the desired view, and then ask that view about its purpose and its content. It's the content you'll want :-).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜