For reference, there is a simple "good enough" method to determine if you're running a first or second+ instance of mIRC. I'm not going to argue the point of whether this is the best or most accurate solution, and DDE may certainly vanish at some point. It's just an available option for your toolkit.

Code:
if ($ddename == mIRC) { echo -a This is the primary instance of mIRC. }
if ($ddename != mIRC) { echo -a This is a secondary instance of mIRC. }


Well. At least I won lunch.
Good philosophy, see good in bad, I like!