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

Help with some code
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Help with some code
quote:
Originally posted by deAd
Cookie, that is just a check, and is not required. The same result will be produced if you do not add that if statement. Plus will not send the message if it can't.
That is not 'just' a check, it is actually very required as it is not always possible to send a message to a chat window (even if you just opened it).

quote:
Originally posted by saralk
I feel like an idiot now. My code is nothing like what you actually wanted :(
don't be, he first asked how to send a message to all online contacts which you indeed provided.

quote:
Originally posted by 134jimbodude
So to put more emails in would i just do:
code:
function OnEvent_Signin(sUserEmail){
var sEmail = "email@address.com;email@adress2.com";
var oContact = Messenger.MyContacts.GetContact(sEmail);
if(oContact.Status != 1){
                    var ChatWnd = Messenger.OpenChat(sEmail);
                    ChatWnd.SendMessage("hi");
}
}

no, absolutely not...

the variable sEmail is a string, it will be compared literally to the string which holds the email of the current contact object. Or in this specific code it will be passed to the GetContact function as the email to find.

"email@address.com;email@adress2.com" is not a valid email address and thus this will never work.

What you want is checking the email of the current contact object against a list or in other words against an array...

PS: make up your mind though, each time you request something different, which requires different code :p;)

This post was edited on 10-02-2006 at 06:30 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-02-2006 06:25 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help with some code - by Jimbo on 10-02-2006 at 05:21 PM
RE: Help with some code - by saralk on 10-02-2006 at 05:44 PM
RE: RE: Help with some code - by Jimbo on 10-02-2006 at 05:46 PM
RE: Help with some code - by saralk on 10-02-2006 at 05:51 PM
RE: Help with some code - by Jimbo on 10-02-2006 at 05:53 PM
RE: Help with some code - by deAd on 10-02-2006 at 06:09 PM
RE: Help with some code - by CookieRevised on 10-02-2006 at 06:11 PM
RE: Help with some code - by Jimbo on 10-02-2006 at 06:13 PM
RE: Help with some code - by saralk on 10-02-2006 at 06:14 PM
RE: Help with some code - by deAd on 10-02-2006 at 06:15 PM
RE: Help with some code - by Jimbo on 10-02-2006 at 06:17 PM
RE: Help with some code - by deAd on 10-02-2006 at 06:21 PM
RE: Help with some code - by CookieRevised on 10-02-2006 at 06:21 PM
RE: Help with some code - by deAd on 10-02-2006 at 06:23 PM
RE: Help with some code - by Jimbo on 10-02-2006 at 06:24 PM
RE: Help with some code - by saralk on 10-02-2006 at 06:25 PM
RE: Help with some code - by CookieRevised on 10-02-2006 at 06:25 PM
RE: Help with some code - by deAd on 10-02-2006 at 06:27 PM
RE: RE: Help with some code - by CookieRevised on 10-02-2006 at 06:31 PM
RE: Help with some code - by Jimbo on 10-02-2006 at 06:27 PM
RE: Help with some code - by saralk on 10-02-2006 at 06:28 PM
RE: Help with some code - by deAd on 10-02-2006 at 06:30 PM
RE: Help with some code - by Jimbo on 10-02-2006 at 06:31 PM
RE: Help with some code - by Jimbo on 10-02-2006 at 06:34 PM
RE: Help with some code - by deAd on 10-02-2006 at 06:36 PM
RE: Help with some code - by CookieRevised on 10-02-2006 at 06:38 PM
RE: Help with some code - by Jimbo on 10-02-2006 at 06:40 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