What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » extracting email help

Pages: (2): « First « 1 [ 2 ] Last »
extracting email help
Author: Message:
jollyscripts
Junior Member
**


Posts: 16
Joined: Aug 2007
O.P. extracting email help
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind){
if(Origin != Messenger.MyName && new Enumerator(ChatWnd.Contacts).item().Email == "bla@bla.com" ){
var newChatWnd = Messenger.OpenChat("bla@bla.com");
newChatWnd.SendMessage(Message);
}
}

does anyone know why this is wrong
09-12-2007 09:27 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: extracting email help
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind){
    if(Origin != Messenger.MyName){
        var Contacts = Messenger.MyContacts;
        var e = new Enumerator(Contacts);
        for(; !e.atEnd(); e.moveNext()){
            var Contact = e.item();
            if(Contact.Email=="bla@bla.com"){
                var newChatWnd = Messenger.OpenChat("bla2@bla2.com");
                newChatWnd.SendMessage(Message);
            }
        }
    }
}

This post was edited on 09-12-2007 at 09:49 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
09-12-2007 09:43 PM
Profile PM Find Quote Report
jollyscripts
Junior Member
**


Posts: 16
Joined: Aug 2007
O.P. RE: extracting email help
thanks but

i want it so when i receive messge from bla
it sends it to another bla
09-12-2007 09:47 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: extracting email help
See updated post above
<Eljay> "Problems encountered: shit blew up" :zippy:
09-12-2007 09:49 PM
Profile PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
RE: extracting email help
* roflmao456 is bored so...
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind){
    if(Origin != Messenger.MyName){
        for(var e = new Enumerator(ChatWnd.Contacts);!e.atEnd();e.moveNext()){
            var Contact = e.item();
            if(Contact.Email == "person-that-is@sending.com"){
                var newChatWnd = Messenger.OpenChat("person-that-is@getting.com");
                newChatWnd.SendMessage(Message);
                }
            }
        }
    }
just like SLM's code..

This post was edited on 09-13-2007 at 01:25 AM by roflmao456.
[quote]
Ultimatess6
: What a noob mod
09-12-2007 10:39 PM
Profile PM Web Find Quote Report
jollyscripts
Junior Member
**


Posts: 16
Joined: Aug 2007
O.P. RE: extracting email help
thank u roflmao
09-13-2007 05:25 PM
Profile E-Mail PM Find Quote Report
jollyscripts
Junior Member
**


Posts: 16
Joined: Aug 2007
O.P. RE: extracting email help
how do i put a "someone says: " before the (Message)
09-13-2007 05:33 PM
Profile E-Mail PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: extracting email help
It'll get sent as a message like if you would simply typed it. You can't really "fake" the name above the message. However, you may use  the following code to temporary change your name.
code:
var sOriginalName = Messenger.MyName; //Save your name
Messenger.MyName = Contact.Name; //Set your name to the contact's name
//Do the stuff
var newChatWnd = Messenger.OpenChat("bla2@bla2.com");
newChatWnd.SendMessage(Message);
Messenger.MyName = sOriginalName; //Reset your name

However, I don't encourage the use of such methods.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
09-13-2007 06:49 PM
Profile E-Mail PM Web Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
RE: extracting email help
[suggestion] you could use the script called "Linked Chats" in the scripts DB.
[quote]
Ultimatess6
: What a noob mod
09-13-2007 08:15 PM
Profile PM Web Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


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