views:

40

answers:

1

Is there a way to send a multi-touch event (something like NSEventTypeMagnify) from one cocoa app to another, so that I could for instance tell iPhoto to zoom into a picture?

A: 

The short answer is no. Your app would need to intercept the events and then use AppleScript, Apple Events or the Accessibility APIs to control the other application.

Rob Keniger
Why would I need to intercept the events? Is there no way to synthesize the event and then send it off to another process? Sorry to ask again, but I am not very familiar with the whole events archicecture in Mac OS X...
Andreas
Have a look at the `CGEvent` functions. `CGEventPostToPSN` should allow you to post an event to a specific app.
Rob Keniger