Estoy trabajando en un script que iterará a través de una carpeta/DroppedItems de fotos y películas y colocará cada una centrada y maximizada en una diapositiva. Me gustaría configurar las películas para que se reproduzcan automáticamente para que funcione con un simple clicker. He intentado un montón de cosas diferentes con la sintaxis y todavía estoy llegando a corto. Esto es lo que tengo que me pareció más prometedor. Parte del problema parece ser que "play settings of theAnimation" parece que se está compilando a un tipo en lugar de una propiedad. Debería decir "ajustes de reproducción de la animación" creo. He intentado forzarlo pegando la sintaxis chevron, pero eso sigue sin ayudar.
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
Esta es la configuración en la interfaz de usuario que estoy tratando de cambiar a través de AppleScript:
Aquí hay una versión simplificada. Funciona en el código (es decir, puedo ver que la propiedad se establece correctamente en true), pero no se refleja en la UI ni en el comportamiento al ejecutar una presentación de diapositivas:
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