I checked this website: https://iworkautomation.com/keynote/document-play.html and

I tried this code to start a Keynote presentation:

tell application "Keynote"
if playing is false then tell the front document to start
end tell

But it doesn't work. The only solution I found was sending keystroke:

tell application "Keynote"
delay 1
tell application "System Events" to keystroke "p" using {command down, option down}
end tell

Why the "start action" doesn't work? I'm on Yosemite

  • The first snippet works fine for me with Keynote 7.1.1. Have you tried other versions of Keynote? – grg May 15 '17 at 16:10
  • No, because I'm on early 2007 Imac and I can't install OSX Sierra, so I can't install Keynote 7.1.1... – Ponzio Pilato May 15 '17 at 16:18
  • Is working even this code for you: tell application "Keynote" to set the bounds of window 1 to {0, 0, 200, 400} stackoverflow.com/questions/11646342/… – Ponzio Pilato May 15 '17 at 16:26
  • Yes, that works fine for me. Is it not working for you? That would look like there's some other issue with AppleScripting Keynote for you then – grg May 15 '17 at 16:27
  • I tried now with Sierra and Keynote 7.1.1 and it works right :) Thanks for your support :) – Ponzio Pilato May 19 '17 at 7:46

You must log in to answer this question.

Browse other questions tagged .