I am working on a script that will iterate through a folder/DroppedItems of photos and movies and place each one centered and maximized on a slide. I would like to set the movies to play automatically so it will work with a simple clicker. I've tried a bunch of different things with the syntax and I'm still coming up short. Here's what I have that I thought was most promising. Part of the issue it seems is that "play settings of theAnimation" looks like it is getting compiled to a type rather than a property. It should say "animation play settings" I believe. I've tried forcing it by pasting in the chevron syntax, but that still doesn't help.

tell application "Microsoft PowerPoint"
    tell theSlide of the active presentation to set theMedia to   ¬
        make new media2 object at end with properties  ¬
        {file name:theMediaFile, lock aspect ratio:true}

    set theAnimation to animation settings of theMedia
    set animate of theAnimation to true
    set playSettings to play settings of theAnimation
    set autoPlay to play on entry of playSettings
    set autoPlay to true -- originally and erroneously omitted; thanks Jack!
end tell

This is the setting in the UI that I am trying to change via AppleScript:

Here is a simplified version. It works in the code (that is, I can see that the property is correctly set to true), but it isn't reflected in the UI nor in the behavior when running a slide show:

tell application "Microsoft PowerPoint"
    set thePresentation to active presentation
    set theSlide to slide (slide index of slide range of selection of document window 1) of thePresentation
    if (count of shapes of theSlide) = 1 then
        set theShape to first shape of theSlide
        set play on entry of play settings of animation settings of theShape to true
    end if
end tell
  • VB scripting might be more up your alley. – JMY1000 Sep 14 '17 at 6:30

To set the play on entry property, use one of the following lines

set play on entry of playSettings to false -- to Start: When Clicked
set play on entry of playSettings to true -- to Start: Automatically
  • Thanks Jack. You are right that I completely forgot to include the final set line in my post. It was in my original code, and it's also in my simplified example above. The issue is that the property is set in the code—I can see the value change in the debugger. But it's not reflected in the UI or slide show behavior. I did find a workaround though. set animate of animation settings of theShape to true will allow the movie to be played with just another click of the presentation remote. That's good enough for me! – Dave C Sep 15 '17 at 15:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .