How can I run a Dopus user defined command on an OnOpenMenu() Event?

I would like to be able to call a Dopus user defined command, when a button's dropdown control is clicked, before the submenu of buttons opens or executes its modifiers.

How can i do this?

The reason for this is so several global variable(s), that are used by the @enableIf modifier, are up to date: @enableif:=$glob:showMenuGroup1 > -1 The variables are set based on other conditions that should trigger a menu item to be enabled or disabled.

There’s no way to do that (and no event with that name at present), but you could have a toolbar button which shows a custom menu that’s entirely generated by your script.

Is a script generated menu a new feature ?
Can you point me in the direction for creating such a dynamically produced menu?

Additional Info

It's a function of the Dialog object; initialise via the choices and menu properties and then call Show().