objective-ccocoamacosapplescriptkeynote

How to (programmatically) change slides in a running Keynote presentation?


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?


Solution

  • 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.