You can also use the $dialog(name/N) identifier to list any open dialogs, where N returns the Nth open dialog. If N is zero, the total number of open dialogs is returned.
That was easy to guess, even if u didn't read the help file. I could guess it. But, he could also just do /help /dialog and he would found anything he wants to know about dialogs.
It may be easy to someone who knows scripting well, but not necessarily for others. Also, it's much more useful to give examples rather than just saying to use help. Yes, people should be using help, but an example as well is good.