How to force all opening dialogs to be closed

How to force all opening dialogs (like the selection dialog) to be closed?
I just would like to have a function when it runs, it can detect all opening dialogs and close all of them. Any help would be appreciated.

To the best of my current knowledge, there is no way to do this with a journal. The NXOpen API does not provide a means of interacting with the standard NX dialogs.

ah - thanks