quote:
Originally posted by TheGuruSupremacy
quote:
Originally posted by nuclide
after nudge I want to write automatically "You didn't response me after 30 sec. " How can I add this..
code:
var SettingMessage;
var SettingTimer;
function OnEvent_Initialize(MessengerStart)
{
SettingMessage = "/nudge";
SettingTimer = 30000;
}
function OnEvent_Timer(TimerID)
{
Debug.Trace("Timer Launched");
Messenger.OpenChat(TimerID).SendMessage(SettingMessage)
Messenger.OpenChat(TimerID).SendMessage("You didn't response me in 30 sec.");
}
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
if (Origin != Messenger.MyName) {
Debug.Trace("Message Received");
var Contacts = ChatWnd.Contacts;
var e = new Enumerator(Contacts);
for(; !e.atEnd(); e.moveNext()) {
var Contact = e.item();
Debug.Trace(" " + Contact.Email);
}
MsgPlus.CancelTimer(Contact.Email);
Debug.Trace("Timer Cancelled");
}
else {
if (Message != SettingMessage)
{
var Contacts = ChatWnd.Contacts;
var e = new Enumerator(Contacts);
var NoContacts = 0;
for(; !e.atEnd(); e.moveNext()) {
var Contact = e.item();
Debug.Trace(" " + Contact.Email);
NoContacts = NoContacts + 1;
}
Debug.Trace(NoContacts);
if (NoContacts == 1) {
MsgPlus.AddTimer(Contact.Email, SettingTimer);
Debug.Trace("Timer Started");
}
}
}
}
Thanx before I try like this but when it says "You didn't response me in 30 sec." after timer activated and then nudge again.. if person no response it will goes on because I always writing message automatically..