No, you had the right on TEXT syntax in the first place, the reason all messages were sent to the active window with your first script was because you used the -a switch. You need a matchtext field for it to work at all, and it will still do it wrong even with it.