What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » How to open group chat windows

Pages: (4): « First « 1 [ 2 ] 3 4 » Last »
How to open group chat windows
Author: Message:
Poki
Junior Member
**


Posts: 16
Joined: Nov 2006
O.P. RE: How to open group chat windows
Ok. So I'm probably not clear enough.
Again, very thankful for all your help. I expect to share my knowledge back...once I master this thing.
So, now I'm trying the OnEvent_ContactSignIn, but the script doesn't run in that case.
I'm just adding;

function OnEvent_ContactSignin("somemail@hotmail.com")
{

}

and that's it, it doesn't work. Neither when I put inside the function some dumb statement as

var ChatWnd = Messenger.OpenChat(sEmails[0]);
                if (ChatWnd.EditChangeAllowed) ChatWnd.SendMessage("bla bla bla");

Do you know why??
11-02-2006 05:52 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: How to open group chat windows
quote:
Originally posted by Poki
code:
function OnEvent_ContactSignin("somemail@hotmail.com")
{

}

Function parameters aren't meant to work that way. A parameter is to retrieve information from the function call, and then process it. What you want is to check if the email matches a certain e-mail address.

Therefore, you need this code:
code:
function OnEvent_ContactSignin(Email) {
   if(Email == "someone@hotmail.com") {
      //Do your thing here
   }
}
More information about declaring correct functions in JavaScript

This post was edited on 11-02-2006 at 06:00 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
11-02-2006 06:00 PM
Profile E-Mail PM Web Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: How to open group chat windows
quote:
Originally posted by Poki
function OnEvent_ContactSignin("somemail@hotmail.com")
{

}
code:
function OnEvent_ContactSignin(Email){
if(Email =="something@hotmail.com"){
//do something
}
}

11-02-2006 06:00 PM
Profile E-Mail PM Web Find Quote Report
Poki
Junior Member
**


Posts: 16
Joined: Nov 2006
O.P. RE: How to open group chat windows
That's right! Thanks again. I'm in my way to make a good (at least for me) script..

So, this is finally going to work!
Almost all my script is working fine, so my last problem seems to be just and if condition...
(promise I will post it after all this)
I have...
if ((Email==sEmails[1]) && (ContactoUno.Status != 1) ){
//do some stuff
}
but it doesn't do the stuff, even after sEmails[1] logs in, and the other one is connected.
I asume the AND condition is right, isn't it? (&&), and I'm sure that the conditions are ok, so? i don't know...
11-02-2006 06:03 PM
Profile E-Mail PM Find Quote Report
Plan-1130
Full Member
***

I keep askin' myself: why?

Posts: 142
73 / Male / –
Joined: Feb 2005
RE: How to open group chat windows
the && is correct, what you could do is use Debug.Trace(ContactoUno.Status); to show values of variables, if it gives an error, you know hte variable is wrong
My Scripts: UltimatFlooder, Advanced PSM Chat, PlusPrivacy, PlusRemote

[Image: Plan-1130.png]
11-02-2006 09:46 PM
Profile E-Mail PM Find Quote Report
Poki
Junior Member
**


Posts: 16
Joined: Nov 2006
O.P. RE: How to open group chat windows
Ok. I'm trying, but actually I don't understand how to use the Debug..
I'm already enabling debuggin options, but what's supposed to happen? what's the debug window? it seems like i'm having a very stupid problem!

Maybe I've found my mistake, but I'm not quite sure. Is it possible that if I've defined a variable in the SignInReady function, is it local and won't work in ContactSignIn function???
11-02-2006 10:18 PM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: How to open group chat windows
quote:
Originally posted by Poki
Maybe I've found my mistake, but I'm not quite sure. Is it possible that if I've defined a variable in the SignInReady function, is it local and won't work in ContactSignIn function???
Yes. What's in the variable?

This post was edited on 11-02-2006 at 10:42 PM by deAd.
11-02-2006 10:42 PM
Profile PM Find Quote Report
Poki
Junior Member
**


Posts: 16
Joined: Nov 2006
O.P. RE: How to open group chat windows
ok, that worked fine once I've realised about the global variable.
but what about the debugging? how to do it? i'm lost
11-02-2006 10:43 PM
Profile E-Mail PM Find Quote Report
Plan-1130
Full Member
***

I keep askin' myself: why?

Posts: 142
73 / Male / –
Joined: Feb 2005
RE: How to open group chat windows
Main window of WLM > Plus! >Scriptdebugger

It's a window that displays useful information on errors etc.
You can add a line, like a variable to show the contents of the variable.
If it's null it's empty, if it's NaN, it's Not a Number etc. etc.

As it's called debug, you can de-bug your program/script ;)
My Scripts: UltimatFlooder, Advanced PSM Chat, PlusPrivacy, PlusRemote

[Image: Plan-1130.png]
11-03-2006 11:18 AM
Profile E-Mail PM Find Quote Report
Poki
Junior Member
**


Posts: 16
Joined: Nov 2006
O.P. RE: How to open group chat windows
So...I might found the problem, so here's the question, do I have to redefine global variables in every function??
Particulary in OnEvent_SingInReady function??
But....are functions where I do not have to redefine them? or in every function do i?
10q....
11-03-2006 10:13 PM
Profile E-Mail PM Find Quote Report
Pages: (4): « First « 1 [ 2 ] 3 4 » 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