Without testing...
Javascript code:
var oContacts = [];
var Message = 'This is where your message would go.';
function OnEvent_Initialize() {
OnEvent_SigninReady();
}
function OnEvent_SigninReady() {
if (Messenger.MyStatus < STATUS_INVISIBLE) return false;
for (var e = new Enumerator(Messenger.MyContacts); !e.atEnd(); e.moveNext())
oContacts.push(e.item())
MsgPlus.AddTimer('', 60000); // Run every minute
}
function OnEvent_Timer() {
var bSent = true;
var oChatWnd;
while (bSent === true && oContacts.length > 0) {
oChatWnd = Messenger.OpenChat(oContacts[0]);
if (oChatWnd.EditChangeAllowed === true) // Can we send a message?
bSent = oChatWnd.SendMessage(Message); // Store the result in a variable incase we've hit the flood protection
Interop.Call('user32', 'SendMessageW', oChatWnd.Handle, 0x10 /* WM_CLOSE */, 0) // Close the window regardless
if (bSent === true) // Was the message sent correctly?
oContacts.shift(); // Drop the first element of the array
else
if (oContacts.length > 0)
MsgPlus.AddTimer('', 60000); // Run every minute
}
}