Shoutbox

[REQUEST] Online Contacts Msg Sender - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [REQUEST] Online Contacts Msg Sender (/showthread.php?tid=66693)

[REQUEST] Online Contacts Msg Sender by erickjbc on 09-26-2006 at 10:06 PM

Hi all and thanks to all developers for their help.

What Im looking for a script or can someone make one.
That when a contact conects MSN auto sends a msg to another contact, all this while im apper offline. Some may think is kinda strange but the situation is that I have an account only for my cellphone and when a contact conects I want it to send a message to my Phone MSN.

Thanks all


RE: [REQUEST] Online Contacts Msg Sender by cloudhunter on 09-26-2006 at 10:08 PM

Is the other account going to be on a mobile account? Because as far as I know, mobile windows and chat windows are treated differently, and only the chat window is able to have messages sent to it.

Cloudy


RE: [REQUEST] Online Contacts Msg Sender by erickjbc on 09-26-2006 at 11:39 PM

Nope its a normal MSN but is not MOBILE, it just auto sends the messages to my celphone is my company's service


RE: [REQUEST] Online Contacts Msg Sender by matty on 09-27-2006 at 02:38 AM

code:
function OnEvent_ContactSignin(sEmail){
    var ChatWnd_obj = Messenger.OpenChat('your email here');
    if (ChatWnd_obj.EditChangeAllowed == true){
       ChatWnd_obj.SendMessage(sEmail+' is online');
       ChatWnd_obj.Close(0);
    }
    else{
        ChatWnd_obj.Close(0);
    }
}

Something like this, however Mobile messages ARE different from normal messages as microsoft has now added offline messages.
RE: [REQUEST] Online Contacts Msg Sender by deAd on 09-27-2006 at 03:00 AM

Mobile messages have always been different. The mobile chat window is actually not the same as a normal chat window, they're a different class and everything.


RE: [REQUEST] Online Contacts Msg Sender by erickjbc on 09-27-2006 at 10:25 PM

nope forget what i said about my cel phone aparently is confusing you, its a normal contact just like the other ones, it just sends the messages to my cellphone indirectly thru my company

Thanks Matty Works Pretty well :D
And can you put that when the message is sent, closes the window? I dont want to come home and find like 200 opened convers :S


RE: [REQUEST] Online Contacts Msg Sender by CookieRevised on 09-27-2006 at 11:02 PM

quote:
Originally posted by erickjbc
Matty: sEmail is the person that conects right?
see the Official Scripting Documentation, which is a must-first-read for anyone who wants to write a script or anyone who wants to know something about scripting.

The documentation is also available from inside the Scripting Editor itself:

[Image: attachment.php?pid=734739]

Thus:
quote:
Scripting Documentation > Events Reference > Messenger Events > OnEvent_ContactSignin

Syntax
    OnEvent_ContactSignin(
        [string] Email
    );

Parameters
    Email            [string] Sign-in email of the contact.
so yes, the parameter Email is the person that connected.

---------------------------------------------------------


quote:
Originally posted by erickjbc
And can you put that when the message is sent, closes the window? I dont want to come home and find like 200 opened convers :S
The script snipped from Matty already does that:
quote:
Originally posted by Matty
code:
function OnEvent_ContactSignin(sEmail){
    var ChatWnd_obj = Messenger.OpenChat('your phone account email here');
    if (ChatWnd_obj.EditChangeAllowed == true){
       ChatWnd_obj.SendMessage(sEmail+' is online');
       ChatWnd_obj.Close(0);
    }
    else{
       ChatWnd_obj.Close(0);
    }
}

But even if the closing wasn't done, there wont be 200 windows open anyways though... only 1: the chat window from your 'PC account' to your 'phone account'.




;)
RE: [REQUEST] Online Contacts Msg Sender by erickjbc on 09-27-2006 at 11:49 PM

jaja you are so right thanks

and just a question how can i dao it with an especific person, like only when that person connects sends the message and not with everybody? is that possible?

hey Thanks a lot:D works pretty well


RE: [REQUEST] Online Contacts Msg Sender by CookieRevised on 09-28-2006 at 12:02 AM

quote:
Originally posted by erickjbc
and just a question how can i dao it with an especific person, like only when that person connects sends the message and not with everybody? is that possible?
Yes that's possible.

Just compared the parameter Email from the event function (thus sEmail in Matty's script snippet) with the email address of the contact you (don't) want. If it matches, (don't) perform the rest...

code:
function OnEvent_ContactSignin(sEmail) {
    if (sEmail === "email of contact you want to be notified for") {
        var ChatWnd_obj = Messenger.OpenChat('your phone account email here');
        if (ChatWnd_obj.EditChangeAllowed == true) {
           ChatWnd_obj.SendMessage(sEmail+' is online');
        }
        ChatWnd_obj.Close(0);
    }
}



---
PS: don't try to double post. Edit your previous post by using the [Image: edit.gif] button underneath the post if you want to add something before anyone has replied.