Indeed. That'd be the easiest way to do it. There's several ways to do it.

You could even make a: "first.open.mrc" file, and have that the first loaded file in your mIRC. With the contents of:

on *:open:?:{ set %_open query }
on *:open:=:{ set %_open chat }
...etc...

Then in another script:

on *:open:*:{ if (%_open == chat) { stuff } | unset %_open }


Personally, I prefer just using :#: :?: :=: in the on events, instead of a *, there's really no point of processing extra stuff (not that there's a noticeable difference, but still.)