Page 1 of 1
Impress running macro
Posted: Mon Jun 07, 2010 10:34 pm
by NZ Jim
I am going to run Impress for a display at a local club. With a slide show running in auto is it possible to trigger a macro each time the slide changes? I would like to use the output pins from the parallel port to operate lights highlighting different parts of the display as the show runs. I am NOT a programmer, but am willing to try writing a macro.
Thanks,
Jim
Re: Impress running macro
Posted: Wed Jun 09, 2010 5:18 am
by FJCC
Yes, a macro can be triggered each time a slide transition happens. There is a SlideShowListener that can be added to the slide show and it will respond to a variety of events. You can see the kinds of events in the names of the sub routines. Here is some simple code that just prints "Slide Transition Started" for each slide.
Code: Select all
Sub addListener
Doc = ThisComponent
Presentation = Doc.Presentation
Listener = createUnoListener("EV_","com.sun.star.presentation.XSlideShowListener")
Presentation.Start()
Controller = Presentation.Controller
Controller.addSlideShowListener(Listener)
end sub
Sub EV_paused(oEv)
End Sub
Sub EV_resumed(oEv)
End Sub
Sub EV_slideTransitionStarted(oEv)
Print "Transition Started"
End Sub
Sub EV_slideTransitionEnded(oEv)
End Sub
Sub EV_slideAnimationEnded(oEv)
End Sub
Sub EV_slideEnded(oEv)
End Sub
Sub EV_hyperLinkClicked(oEv)
End Sub
Sub EV_disposing(oEv)
End Sub