如何获取另一个应用程序窗口的标题,位置和大小在Mac OS没有辅助功能API? [英] How to get another application window's title, position and size in Mac OS without Accessibility API?

查看:1218
本文介绍了如何获取另一个应用程序窗口的标题,位置和大小在Mac OS没有辅助功能API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果不支持Accessibility API,如何获取窗口的标题,位置和大小?辅助功能检查器根本看不到它。说,它是X11.app中的一个xterm窗口(X11-> Applications-> Terminal)。

How can I get window's title, position and size if it does not support Accessibility API? Accessibility Inspector does not see it at all. Say, it's a xterm window in X11.app (X11->Applications->Terminal).

推荐答案

通过CGWindow.h头文件中公开的方法获取所有此窗口信息。 Apple的文档位于 Quartz Window Services Reference 页面。他们还提供了一个非常信息的示例应用程序,名为儿子< a>这应该让你开始。

You should be able to get all of this window information through the methods exposed in the CGWindow.h header file. Apple's docs are online on the Quartz Window Services Reference page. They also have a very informative sample app called Son of Grab which should get you started.

这篇关于如何获取另一个应用程序窗口的标题,位置和大小在Mac OS没有辅助功能API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆