从 MAC OS X 应用程序中提取信息

发布于 2024-09-19 06:27:21 字数 194 浏览 8 评论 0原文

我有一个简单的问题,我会直截了当。

假设我正在运行一个第三方可可应用程序,其中有一个聊天框。好吧,我需要从另一个应用程序实时捕获聊天框中的文本,并使用该信息实时写入日志文件。

我确信有办法,只是不知道从哪里开始。我有使用 cocoa 和 Objective C 的经验,我在 iPhone 应用商店里有一些应用程序。

非常感谢

I have a simple problem, I will be straighforward.

Suppose I have a third-party cocoa application running that has a chat box inside. Well, I need to capture the text inside that chat-box in real time from another application and write a logfile in real time with that information.

I am sure there is a way, I just don't know where to start. I have experience with cocoa and objective C, I have some apps in the iphone app store.

Thank you very much

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

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

发布评论

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

评论(2

时光倒影 2024-09-26 06:27:21

除非应用程序具有适当的脚本功能(例如AppleScript)或具有某种外部API,否则您将无法执行此操作。

Unless the app is suitably scriptable (e.g. AppleScript) or has some kind of external API then you're not going to be able to do this.

云朵有点甜 2024-09-26 06:27:21

简而言之:联系应用程序的开发人员,但不要抱太大希望。

不幸的是,在当今内存受保护的时代,我们或多或少必须满足于应用程序为我们提供的工作内容。

但是:您并非完全没有追索权。使用F-Script,您可能能够附加到进程并导致一些控制器或其他发出您可以捕获和记录的通知。

编辑:如果(看起来是这样)它是一个 Carbon 应用程序,那么您就完蛋了:

  1. F 脚本和类似的东西不太可能实现。
  2. 即使是这样,尝试在 Carbon 应用程序(即 C++ 应用程序)上进行注入即使不是完全不可能,也可能是徒劳且令人失望的。
  3. 考虑到 Carbon 是如何被弃用的(以及如何弃用的!),应用程序不太可能使用适合此类事情的 API 进行更新。
  4. 上述所有的。

重新编辑:一个小小的aber;尽管不太可能,但您可以使用接口脚本实现某些目标,但还是有可能;我不会抱有希望。

In short: Contact the developer of the application, but don't get your hopes up.

Unfortunately, in this day and age of protected memory and whatnot, we more or less have to be content with what the applications give us to work with.

However: You are not entirely without recourse. Using F-Script you might be able to attach to the process and cause some controller or other to emit notifications that you can capture and log.

Edit: If, as appears to be the case, it's a Carbon application, you are well and truly hosed:

  1. F-script and similar is unlikely to be possible.
  2. Even if it is, trying injection on a Carbon app, that is to say, a C++ app, is likely to be an exercise in futility and disappointment, if not completely impossible.
  3. Seeing as how Carbon is deprecated (and how!), the application is unlikely to be updated with a proper API for that sort of thing.
  4. All of the above.

Reedit: One tiny little aber; it is possible, although unlikely, that you can achieve something using Interface Scripting, but again; I wouldn't get my hopes up.

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