code:
var offon = 0;
function OnEvent_Initialize(MessengerStart)
{
while (offon=0)
{
code to be executed
}
}
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin,Message,MessageKind)
{
if (Message == "STOP!") {
offon=1;
}
}
should work, might need a few adjustments (cant test right now).
edit: just so you know this will probably freeze messenger. you'll probably have to look for an alternate route to getting this done (a friend (-dt-) suggested a timer set for 100milliseconds.)