Using interactions or Macros to change text color on click

I’m planning to make a Jeopardy-style Impress template to use for game nights, a student org, etc, and one of the really key functionalities I’d like is to be able to click on a certain slide I’m on (perhaps a specific object, like a “return to board” text box) and then return to the original board slide, and change the color of the text box I’d originally clicked to get to the slide I was on. I’m not familiar with how Macros work, but I figure that’s the route I have to go through. What’s an effective way to complete this behavior? In incredibly simplistic terms, I figure this is the general logic I’d like to go through:

when (click on TextBox1 on SlideTopic1Points500):
    change BoardSlide.Topic1Points500Text to gray
    goto to BoardSlide

Any help would be greatly appreciated!

long standing request … jeopardy game template
which seems to bump into unfortunate bugs and limitations of Impress (as discussed here : basic - Unable to change shape color using macro in LibreOffice Impress presentation mode - Stack Overflow )

so, (re)starting from Jeopardy Quiz Template | Apache OpenOffice Templates

the macro assigned to Back shape interaction should look like

Sub interactBackHome 
  oSlideHome = ThisComponent.getDrawPages().getByName("home") 
  oController = ThisComponent.getPresentation().getController() 

  oShape =  oSlideHome.getByIndex(  oController.getCurrentSlideIndex() -2 )
  oShape.FillColor = RGB(160, 160, 160) 
  wait 333
  
  oController.gotoSlide( oSlideHome)
End Sub

you can try on jeopardy.otp (25.2 KB)
(only 8 first Back are assigned :neutral_face: )

This actually looks super promising, thank you! Do you know offhand if all of those syntax components exist in the documentation for Macros? This is feeling like something I could accomplish over the course of a break with some thoughtful digging, provided the documentation is rich enough!

good question …
defiinitely not from Chapter 9, Slide Shows and Photo Albums :innocent:

For reference, you should have found LibreOffice: XSlideShowController Interface Reference
which, for a newcomer, is almost quite unlikely, lost in so noisy google results :wink:

Retrospectively, this example could be added there : Macros for LibreOffice Impress - The Document Foundation Wiki
or wherever you’ll find it useful / Current documentation for LibreOffice programs is incredibly fragmented - #4 by Domojestic

You may discuss it following up from there : https://community.documentfoundation.org/t/impress-guide-24-2/11965/3

Definitely going to have to look through that API, I didn’t know Macros in Python were supported! :grin: Offhand, though, do you know if they’re supported in the Flatpak version of LibreOffice? All the tutorials for making a Python macro require I install a package from apt, though this wouldn’t do much considering my LibreOffice install isn’t form my distro’s repository.

Edit: From the official Flatpak announcement:

At this time, there is no Flatpak version of the LibreOffice Software Development Kit (SDK).

Oh, well. :confused: Looks like I’ll have to learn LibreOffice Basic…

but not because of the SDK. IMHO you need it to compile LibreOffice yourself, but not for Macros.
.
If you wish to use Python you should check, if the extension APSO is installed.
Moreover, you could also steer LibreOffice via a port, if it is started with the parameter --accept

I was trying to figure out how to use Python for macros, but all the tutorials were telling me to run a command that would have something installed from my distro’s repos (on Linux), which wouldn’t work considering I was using the Flatpak.

After thinking about it, though, I figure using Basic might honestly be better, because then that way I could release what I make as a template without worrying about whether other people would be able to use the template correctly (since I can’t know if everyone will have the Python thing).

So, no harm, no foul!

Could you post some links. Maybe they show you how to install some IDE first. The point is similiar to the SDK. You as developer will use a nice IDE, but your users should never need this.
.
Actually with Linux an installed LibreOffice will usually use the Python-interpreter already available in the OS. (In Windows LO brings its own python as there is usually no python in Windows). For Flatpack, AppImage and Snap one has to find out, if everything works without tweaks.
.
I have to admit: First steps into BASIC are much easier.