Applescript to set transition timers

455 views Asked by At

I recently switched from PowerPoint to Keynote. I have ~50 presentations and together they add up to more than 5000 slides. Each slide has embedded audios it can be anywhere from 3 seconds to 30 seconds long. In PowerPoint I wrote a Macro to insert audios to slide and add transition timer same as audio length.

With Keynote I can read / play the presentations well, audio plays well but all the transition timers are disabled.

If I click auto transition then it sets every slide transition timer to 0.5s which I can change but going through all the slides and setting the timer manually is such a mundane task that I have not inclination of doing it.

Can the transition times for a presentation can be interested with automator or can it be imported from a CSV sort of file. The way I did this in Powerpoint was I created a static array with all slides timer I wanted, later looped through each slide and set the timer. can similar thing can be done in Keynote with applescript

Thanks for your help

1

There are 1 answers

5
CRGreen On BEST ANSWER

Looks like this works, but I'm not totally familiar with the nuances of these settings:

tell application "Keynote"
    set ss to slides of document 1
    set c to count of ss
    set n to 1
    repeat until n > c
        set transition properties of item n of ss to {transition delay:0.5, automatic transition:false, transition effect:no transition effect, transition duration:0.5}
        set n to n + 1
    end repeat
end tell

Here is the solution - it worked beautifully. I did not find any glitches.

tell application "Keynote"
    set ss to slides of document 1
    set c to count of ss
    set timerlist to {5, 4, 3, 9, 6}
    set n to 1

    repeat until n > c
        set timer to item n of timerlist
        set transition properties of item n of ss to {transition delay:timer, automatic transition:true, transition effect:no transition effect, transition duration:0.5}
        set n to n + 1
    end repeat
end tell