Judge the main window when mulitple windows open

I'm wondering when I open mulitple windows of Directory Opus, how I can find the main window?
So the new path open by third part software or Autohotkey script or other commands can be clearly located with the window of DO known in advance.
It is a very important function. Thank you!

DOpus.listers.lastactive may be what you want.

It can't achieve the aim of find the fixed main window? Because the lastactive lister is
changing constantly?

The listers are all equal. One of them will be active, depending on user input.

Add an event that opens from the outside? Then you can customize it with scripts.
Currently, you can use scripts to set a window as the "Main window", but there is no good way to judge, such as reusing the tab.

What do you mean by "main window", if not the last active window?

What makes the window you want to find special compared to any of the others?

When I have two main windows, I want to open folder or path from third party software in the fixed windows.

That's very unclear: now you have two main windows and one is fixed.
You need to define those terms (main and fixed) as they are not common in the context of Opus: there's no such things as main or fixed window.
What do these terms mean for you?

There is no "fixed" window.

You could mark a specific lister and move newly opened folders to it with scripting.