Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Scripting Keynote and getting odd results

Hi all.


I'm trying to do a very simple thing - look at the currently running Keynote presentation and then get the presenter notes from it. I've noticed however that when I run my code that the current slide doesn't seem to update its value as the presentation progresses and remains stuck on whatever the slide that was selected in the editor was when I started the presentation.


For reference - running Mavericks, and Keynote is updated to 6.2


I've made this replicable with the most minimal code possible. To do this, create or open any Keynote presentation. Start the presentation on slide 1 and then advance a couple of slides. So your presentation should now be at a different point than where you started it. Hide keynote (h from play mode).


Now run this script:


tell application "Keynote"


get properties of current slide of first document


end tell


This will now spit out the properties of the slide you started the presentation on, NOT the slide you are currently looking at.


Move a couple more slides and run it again, you'll see the same thing.


Now quit out of the presentation mode and stay within the editor.


Select slide 1 and run the script and you'll get its properties. Move to slide 2, run the script and you'll get its properties. So this works within the context of the editor, just not within the context of the presentation mode.


I've tried going through the window object (there are 2 when you're in presentation mode) but they both refer back to the same document and I end up at the same place.


Any help would be greatly appreciated on this as it's sending me mad.


Cheers

Andrew

OS X Mavericks (10.9.2)

Posted on Apr 18, 2014 5:30 PM

Reply
3 replies

Scripting Keynote and getting odd results

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.