Is there any way to send an application (iTunes) an AppleEvent from cocoa objective-c code?
What I'm trying to do is make a dockling to tell iTunes to play, pause etc. I can do it in AppleScript, but the derived applications take longer to startup than it takes me to change to iTunes and press a key on my keyboard!
The dockling bit works fine, but I can't find any info relating to Apple Events in the developer COCOA documentation. It's there for carbon, but not cocoa.
The events as can be used in AppleScript are:
tell application "iTunes"
«event hookPlay»
«event hookPaus»
«event hookStop»
«event hookNext»
«event hookPrev»
end tell
Oh yeah, the other problem is I've never done anything with AppleEvents before so I'm not sure what is involved, probably just creating the event and sending it but I don't even know how to do that!
Cheers
------------------
Shh! Be vewy, vewy qwiewet! I'm hunting wuntime ewwors