Auto-closing user dialogue (macro, Basic)

Hi!
For some reason I can't figure this out…

I have made a simple dialogue with two buttons and a numeric field. Those
buttons triggers two different subroutines that does two different things
and then closes the entire dialogue.

I want the dialogue to close automatically after ten seconds if neither of
the buttons have been pushed. The remaining time is to be displayed in the
numeric field mentioned above.

However, I couldn't find a way to trig a function ”when nothing else
happens”. Here's what I want to do:
Dialogue opens.
User does nothing, so a subroutine is called checking the remaining time
and displays it in the numeric field.
User still doesn't do anything and the above repeats until remaining time
is zero, then the dialogue is closed.

Any suggestions?

I do not think its possible to create a user-defined event in a Macro in LibreOffice.

The docs say nothing about how it can be done.

https://wiki.openoffice.org/wiki/Documentation/DevGuide/Basic/Adding_Event_Handlers

https://help.libreoffice.org/Basic/Event-Driven_Macros

Hi Johnny,

Hi!
For some reason I can't figure this out…

I have made a simple dialogue with two buttons and a numeric field. Those
buttons triggers two different subroutines that does two different things
and then closes the entire dialogue.

I want the dialogue to close automatically after ten seconds if neither of
the buttons have been pushed. The remaining time is to be displayed in the
numeric field mentioned above.

However, I couldn't find a way to trig a function ”when nothing else
happens”. Here's what I want to do:
Dialogue opens.
User does nothing, so a subroutine is called checking the remaining time
and displays it in the numeric field.
User still doesn't do anything and the above repeats until remaining time
is zero, then the dialogue is closed.

Any suggestions?

Not sure if that can be of help. Have a look at that page:
https://documentation.libreoffice.org/en/english-documentation/macro/

get the Dialogs RefCard (https://documentation.libreoffice.org/assets/Uploads/Documentation/en/MACROS/RefCards/LibOBasic-6-Dialogs-Flat-A4-EN-v103.pdf). The Non-Modal dialog part might give you some ideas.

HTH,