I noticed some time ago that there DOES exist an on dialog active event, used as follows:

on *:DIALOG:<Dialog>:ACTIVE:0:{
if ($dialog($dname).active) { it was made active }
else { it was made inactive }
}
this feature seems to have been implemented in mIRC v6.03 or earlier, but did not start to work properly before mIRC v6.1x.
It is neither in the /help file, which is the biggest reason to why this has not been discovered. I bid people to be careful using this though, as a /dialog -v <a-dialog> would start an non-stop loop if you have two dialogs doing this, as mIRC sends out an event once a dialog is inactivated and once it is activated. Enjoy, take care now.


Teazle
#help.script - QuakeNet