是否有任何已知的方法来操纵其他应用程序' MacOS中的UI元素?
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有框架或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.