One thing I’ve wondered about for the longest time is how Apple Events work. I’ve never really found a really good tutorial on them, and they’ve always mystified me. It feels incredibly fragile to use AppleScript in shipping code, but I’ve always done it because it’s far easier to tell app “iTunes” play playlist “foo” end tell instead of using the freaky AE APIs.
I found a couple cool tools and bits of documentation that may help demystify this process for me, and I’d like to share quick. Just type: setenv AEDebug 1 setenv AEDebugSend 1 setenv AEDebugReceives 1 into a terminal window and then launch the app of interest from the terminal using the open command.
You can then go and open up the Console application to see the fruits of your labor!