Watching the following script’s output, with Keynote active:
repeat until false tell application "Keynote" tell front document tell current slide get slide number end tell end tell end tell delay 1 end repeat
When the user clicks on a new slide, I’m expecting the “get slide number” line to return, duh, the new slide number, since the current slide has changed. Not rocket science, right? However, if I click on a new slide with Keynote active, and then activate the Script Editor by clicking on a window then, voila, the “get slide number” line starts returning the expected result after Script Editor is active, but not before.
(I’m using Yosemite preview 2, Keynote 6.2)
I can reproduce this behaviour using appscript as well. I filed a radar already, but I’m just wondering if anyone has any bright ideas for a workaround to this annoying bug? Not exactly confident this one will get fixed…
I need this to work as I’ve written a simple app that needs to monitor what slide Keynote is at and then execute some code upon change in slide number. Be nice to have a modern scripting architecture that could be event driven….
Regards, Adam |