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

Pages: (3): « First « 1 2 [ 3 ] Last »
Help with some code
Author: Message:
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: Help with some code
See my code above :)

EDIT: here, reposted:
code:
function OnEvent_Signin(sUserEmail){
var sEmails = new Array("email@address.com","email2@address.com");
for(item in sEmails){
var oContact = Messenger.MyContacts.GetContact(sEmails[item]);
if(oContact.Status != 1){
var ChatWnd = Messenger.OpenChat(sEmails[item]);
ChatWnd.SendMessage("hi");
}
}
}

This post was edited on 10-02-2006 at 06:31 PM by deAd.
10-02-2006 06:30 PM
Profile PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
31 / Male / Flag
Joined: Jul 2006
O.P. RE: Help with some code
Thanks so much for everyones help
10-02-2006 06:31 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Help with some code
quote:
Originally posted by deAd
quote:
Originally posted by CookieRevised
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).
If you do not include this check, the message will not be sent. If you do include the check, the message won't be sent. Either way, the message will be sent only when it can be. I don't see the necessity of it :S it's not like it causes problems or something?
yes it will cause problems and errors.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-02-2006 06:31 PM
Profile PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
31 / Male / Flag
Joined: Jul 2006
O.P. RE: Help with some code
so cookie would this work:
code:
function OnEvent_Signin(sUserEmail){
var sEmails = new Array("email@address.com","email2@address.com");
for(item in sEmails){
var oContact = Messenger.MyContacts.GetContact(sEmails[item]);
if(oContact.Status != 1){
var ChatWnd = Messenger.OpenChat(sEmail[item]);
                    if (ChatWnd.EditChangeAllowed) ChatWnd.SendMessage("hi");
}
}
}


This post was edited on 10-02-2006 at 06:34 PM by Jimbo.
10-02-2006 06:34 PM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: Help with some code
Almost, there's a typo in it:

code:
function OnEvent_Signin(sUserEmail){
var sEmails = new Array("email@address.com","email2@address.com");
for(item in sEmails){
var oContact = Messenger.MyContacts.GetContact(sEmails[item]);
if(oContact.Status != 1){
var ChatWnd = Messenger.OpenChat(sEmails[item]);
                    if (ChatWnd.EditChangeAllowed) ChatWnd.SendMessage("hi");
}
}
}
10-02-2006 06:36 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Help with some code
yep

(note that dead's code will work too in most cases, but it will produce errors in the (rare) cases that you can't send a message to the chatwindow; although you wont notice these errors as a user)
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-02-2006 06:38 PM
Profile PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
31 / Male / Flag
Joined: Jul 2006
O.P. RE: Help with some code
Thanks again everyone
10-02-2006 06:40 PM
Profile E-Mail PM Find Quote Report
Pages: (3): « First « 1 2 [ 3 ] 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