code:
function OnEvent_Initialize(MessengerStart)
{
MsgPlus.AddTimer("WindowCount", 5000);
var Windows = Messenger.CurrentChats;
Messenger.MyPersonalMessage ("Chats open: " + Windows);
}
function OnEvent_Uninitialize(MessengerExit)
{
}
function OnEvent_Timer(WindowCount)
{
MsgPlus.AddTimer("WindowsCount", 5000);
var Windows = Messenger.CurrentChats;
Messenger.MyPersonalMessage ("Chats open: " + Messenger.CurrentChats);
}
Unless you want the script to set your PSM only three times (on initialize, at 5000 and 10000 seconds), you should consider updating your script
(for now, I'm assuming Messenger.CurrentChats shows the chat window count. I can't check since I don't have messenger and the Plus! documentation here
)