3

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?

Cœur
  • 37,241
  • 25
  • 195
  • 267
smokris
  • 11,740
  • 2
  • 39
  • 59

1 Answers1

4

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
  • 1,363
  • 1
  • 15
  • 27
  • 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 Jul 25 '09 at 15:31
  • 2
    Instead of NSAppleScript, you might try OSAKit. Not only is it more full-featured, but NSAppleScript has a history of being leaky. – Peter Hosey Jul 25 '09 at 15:58