Setting a movie to play automatically on a Mac with AppleScript

I'm creating a script that will take a folder of photos and videos and create a presentation with each media file maximized and centered on a slide of its own. I've got pretty much everything working, except for the autoplay setting. I'm sure it's just a syntax issue, but I have tried a bunch of different stuff and nothing seems to be working. Here are a couple of attempts:


#1
tell theSlide
set theMedia to make new media2 object at end with properties {file name:theMediaFile, lock aspect ratio:true, {animate : true, animation play settings:{pause animation: false, play on entry: true}}}

#2
tell theSlide
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

Thanks!
·Dave

I should mention that I'm trying to set Start = Automatically under Playback tab when a movie is selected.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Dave,

 

Given your description, we will move the thread to Office>PowerPoint>Microsoft Office Programing>Office 2016 category for giving you professional support. It’s the specific channel that handles this kind of questions.

 

Thanks for your understanding.

 

Tim

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I am convinced that there is a bug in PowerPoint's AppleScript handler where this just doesn't work. However, I did find that if you simply set animate to true will create a "play movie" animation event so that the first click of the presentation remote will advance to the slide with the movie on it, then a second click will play it. (And of course the third click advances to the next slide.)

tell theSlide
  set theMedia to make new media2 object at end with properties {file name:theMediaFile, lock aspect ratio:true}

  set animate of animation settings of theMedia to true

end tell

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated September 30, 2021 Views 81 Applies to: