Register

Macro to change slide duration

This forum allows users to share macros created with ViewletBuilder7 Enterprise and above.
Site Admin
User avatar
Posts: 223
Joined: Fri May 26, 2006 1:51 pm
Location: Rochester, NY

Macro to change slide duration

Postby Andrew » Tue Jan 31, 2012 9:57 am

This macro was sent to a customer that wanted to increase the duration of all of his slides that were shorter than 1 second to 5 seconds.

Code: Select all
import com.qarbon.shasta.project.*;
import com.qarbon.shasta.command.edit.*;

log.debug "Set Slides Duration"

def slides = sequence.getChildren()
for(def slide in slides)
{
    if(slide.getDurationTime() < 1000)
    {
        slide.setDurationTime(5000)
        slide.updateTiming()
   
        if(!undoManager.isEditPending())
            undoManager.startEdit(slide)
    }
}

selectionManager.reselectAll(this)

Andrew Branch

Return to Macros

Who is online

Users browsing this forum: No registered users and 1 guest