How to get the last run macro ?

Dear fellow LibreOffice user,

I’m trying to get the URI of the latest macro invoked via the “Macro Selector” ( Run Macro ) dialog.

I was hoping that this macro URI would be stored somewhere in an internal variable that i could access, but so far i haven’t been able to find it.

Is there some way to find out which particular macro the user has executed most recently from the Macro Selector dialog?

Thanks in advance, lib

Maybe easier to answer the initial problem instead how you think to solve it??

xy problem

Well … if i already had the answer then i wouldn’t have asked the question, but i could think of one difficult way to solve it in theory:

  1. intercept the Macro Selector dialog at the moment it is invoked by the user,
  2. listen until the user presses the “Run” button, then obtain the selected macro.
    In practice i lack the skills to implement this, plus there might be another approach that i overlooked.