是否有任何已知的方法来操纵其他应用程序' MacOS中的UI元素?

发布于 2025-02-06 18:30:55 字数 205 浏览 1 评论 0原文

MacOS应用程序可以通过任何方式更改正在运行的其他应用程序的UI?我正在谈论的事情的一些示例是在仅阅读文本字段中更改文本,强制执行残障按钮或将控件添加到窗口中,而在另一个应用程序中,而不是设计的一个。支持这种互动。

如果您想知道我的用例是什么,我只是对修补软件感兴趣。我想我需要禁用系统的完整性保护,这对此我很好。但是,是否有一个现有的框架或API可以做到这一点,甚至是私人框架?

Is there any means by which a macOS application can make changes to the UI of other applications that are running? Some examples of the kind of thing I'm talking about would be changing the text in a read-only text field, force-enabling a disabled button, or adding controls to a window, but in another application, and not one that was designed to support such interaction.

If you're wondering what my use case is, I'm simply interested in tinkering with software. I imagine I'd need to disable System Integrity Protection, and I'm fine with this. But is there an existing framework or API to do this, even a private one?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

少女情怀诗 2025-02-13 18:30:55

没有框架或API可以做到这一点,因为显然不会以任何方式受到苹果的欢迎。

但是,您将可以通过一些努力来做到这一点。
我要说的是,您需要编写一个库,将其注入目标过程上下文,然后通过一些标记搜索UI元素,您应该分别为每个应用程序发现自己。
一旦获得元素参考 - 您可以更改其属性。

There is no framework or API to do this, as it is obviously not welcomed by Apple in any way.

However, you will be able to do this with some efforts.
I would say, you will need to write a library, inject it in the target process context, and then search UI elements by some marks you should find out yourself for each app separately.
Once you got the element reference - you can change its properties.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文