What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request]: Send message on conversation start, repeat message on timer.

[Request]: Send message on conversation start, repeat message on timer.
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Request]: Send message on conversation start, repeat message on timer.
Probably better like this:

code:
var objChatWnd = {};
var sCommand = '/somecommand';
var iDelayInMinutes = 2;

function OnEvent_ChatWndCreated(oChatWnd){
    objChatWnd[oChatWnd.Handle] = {};
    objChatWnd[oChatWnd.Handle].oChatWnd = oChatWnd;
    oChatWnd.SendMessage = sCommand;
    MsgPlus.AddTimer(oChatWnd.Handle, iDelayInMinutes*60000);
}

function OnEvent_ChatWndDestroyed(oChatWnd) {
    delete objChatWnd[oChatWnd.Handle];
    MsgPlus.CancelTimer(oChatWnd.Handle);
}

function OnEvent_Timer(iHandle) {
    objChatWnd[iHandle].oChatWnd.SendMessage(sCommand);
    MsgPlus.AddTimer(iHandle, iDelayInMinutes*60000);   
}

This post was edited on 02-18-2008 at 03:01 PM by matty.
02-18-2008 02:22 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Request]: Send message on conversation start, repeat message on timer. - by Eiron on 02-14-2008 at 07:37 PM
RE: [Request]: Send message on conversation start, repeat message on timer. - by roflmao456 on 02-18-2008 at 08:29 AM
RE: [Request]: Send message on conversation start, repeat message on timer. - by matty on 02-18-2008 at 02:22 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On