Ken Tozier wrote:

I've been working with AppleEvents and discovering their internals by
setting the following in the terminal

export AEDebugSends=1; export AEDebugReceives=1

What I'd like to be able to do is observe apple events exactly like
this tool but format them into an NSDictionary so they can be used to
easily build complex events. Since the above tool observes events, it
must be possible, but how would I capture these events in my own tool?
Is this something that needs to be a kernel extension? Or is there a
higher level way to do it?

Have you looked at AE Monitor?

        http://software.oxalyn.com/AEMonitor

Not aware of public APIs for sniffing AE traffic myself (if any exist, they aren't advertised), but at worst you could always capture and parse AEDebug output yourself. It's pretty straightforward, and most of it could probably be massaged to pass to the Apple Event Manager's AEBuild* functions and reconstitute that way.

There's also ASTranslate, which allows you to run AppleScript commands and get the equivalent Python/Ruby/ObjC appscript code (basically the same trick as Script Editor's 'Event Log' pane uses):

        http://appscript.sourceforge.net/tools.html

Mike Ash's AEVTBuilder might also be of some interest to you, being an ObjC version of the AEBuild* functions.


HTH

has

p.s. None of this is specific to Cocoa, so might be a good idea to move future discussion to applescript-implementors.

--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to