views:

233

answers:

1

I'm working on a Cocoa application I'd like to use to remotely (on the same machine, from a different process) control which slide is currently displayed in a running Apple iWork '09 Keynote presentation.

How should I approach this?

+4  A: 

The Keynote Applescript dictionary has an advance command. Using:

Tell application "Keynote" 
advance 
end tell

seems to do what you require. You can either use scripting bridge or NSApplescript to run this script from within a Cocoa application.

Ian Turner
Perfect. Thanks, Splash6. I had checked Script Editor.app's Library, but I didn't see Keynote listed in there, so I assumed it didn't support AppleScript.
smokris
Instead of NSAppleScript, you might try OSAKit. Not only is it more full-featured, but NSAppleScript has a history of being leaky.
Peter Hosey