且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从所有正在运行的应用程序获取所有打开的NSWindow的列表?

更新时间:2023-10-20 17:47:04

必须 NSW Windows ,并且 NSWindow 只提供您自己地址空间中的窗口的接口。

Note that not all windows are necessarily NSWindows, and that NSWindow only provides an interface to windows in your own address space.

访问每个窗口的支持方式是 CGWindow API。请查看抓取之王示例代码,了解其完成情况。

The supported way to access every window is the CGWindow API. Take a look at the Son of Grab sample code to see how it's done.