Impress running macro

Discuss the presentation application

Impress running macro

Postby NZ Jim » Mon Jun 07, 2010 10:34 pm

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.
OpenOffice 2.4 on Ubuntu 8.04
NZ Jim
Posts: 1
Joined: Mon Jun 07, 2010 10:29 pm

Re: Impress running macro

Postby FJCC » Wed Jun 09, 2010 5:18 am

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   Expand viewCollapse view
Sub addListener
Doc = ThisComponent
Presentation = Doc.Presentation
Listener = createUnoListener("EV_","")
Controller = Presentation.Controller

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
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Posts: 8306
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Return to Impress

Who is online

Users browsing this forum: No registered users and 3 guests