Why not try something like this, put it in the first mIRC.
on 1:TEXT:first mIRC*:#test123: {
 msg #test123 Hello $nick I am number one.

Second mIRC says "first mIRC", whenever first mIRC see's "first mIRC" in the channel it will respond with "Hello nickname I am number one.

I hope you understood.
You can also refer to the help file: /help on TEXT