Tap AppleEvents being sent to another application

南楼画角 提交于 2019-12-23 03:47:08

问题


Is it possible to monitor or tap the stream of Apple Events being sent to a process, in the same way you can tap Quartz Events?

I have an application that talks to another application to force it to import files, but it does so in a way that's unavailable through menus or UI scripting, and I'm trying to track down how it does this.


回答1:


Do you need to do this programmatically or is manual/interactive OK? If manual is OK, here are some approaches:

Try using AppleScript Editor to record the target app.

Try using the techniques listed in Technical Note TN2124: Mac OS X Debugging Magic under Apple Events. For example, set the environment variable AEDebugReceives to 1 and run the target app under that environment.




回答2:


there is no such tap for ae events AFAIK I am happy to be proven wrong

there are NSDistributed notifications which you can tap!



来源:https://stackoverflow.com/questions/15422004/tap-appleevents-being-sent-to-another-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!