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

Script Help!
Author: Message:
leetking
New Member
*


Posts: 10
– / Female / Flag
Joined: Dec 2008
O.P. Script Help!
Hello,
I just started to write some script.
I have already my first question: How can I make a new line writing a text?
My Script:

iOriginWnd.SendMessage("Test1
Test2");

This doesnt work! Is there any special command for that?
(It shouldnt write 2x, like:
iOriginWnd.SendMessage("Test1");
iOriginWnd.SendMessage("Test2");




Question Number 2:

I want that when contacts say "you are dumb" that it will be hided. How I do this? (So I won't receive that message)


Question Number 3:

I want the thing from number 2 only work for 2 contacts. How can I check their email with a script?

This post was edited on 12-11-2008 at 05:49 PM by leetking.
12-11-2008 04:53 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Script Help!
jscript code:
OriginWnd.SendMessage("Test1\nTest2");
12-11-2008 05:56 PM
Profile E-Mail PM Find Quote Report
leetking
New Member
*


Posts: 10
– / Female / Flag
Joined: Dec 2008
O.P. RE: RE: Script Help!
quote:
Originally posted by matty
jscript code:
OriginWnd.SendMessage("Test1\nTest2");


Thank you, it works!
What about the other things?
12-11-2008 06:04 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Script Help!
jscript code:
function OnEvent_ChatWndReceiveMessage (oChatWnd, sOrigin, sMessage, nMessageKind) {
    for (var oContact = new Enumerator(oChatWnd.Contacts); !oContact.atEnd(); oContact.moveNext()) {
        if (oContact.item().Email === 'johndoe@hotmail.com' && sMessage.toLowerCase() === 'you are dumb') {
            sMessage = '';
        }
    }
}
12-11-2008 06:17 PM
Profile E-Mail PM Find Quote Report
leetking
New Member
*


Posts: 10
– / Female / Flag
Joined: Dec 2008
O.P. RE: Script Help!
I got now this:

jscript code:
function OnEvent_ChatWndReceiveMessage(oChatWnd, sOrigin, sMessage, nMessageKind) {
    for (var oContact = new Enumerator(oChatWnd.Contacts); !oContact.atEnd(); oContact.moveNext()) {
        if (oContact.item().Email === 'contact_email@hotmail.com') {
        if(sMessage=="!test"){
        oChatWnd.SendMessage("it works");}
        }
    }
}

It works fine, but, it also works for me now. How can I change it so it will only work for my contact?
12-11-2008 06:36 PM
Profile E-Mail PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
RE: Script Help!
check if sOrigin doesn't equal your display name :P
[quote]
Ultimatess6
: What a noob mod
12-11-2008 09:20 PM
Profile PM Web Find Quote Report
« 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