What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » ChatWnd contains no properties or methods

ChatWnd contains no properties or methods
Author: Message:
Jeroen Noten
New Member
*


Posts: 8
Joined: Aug 2006
O.P. ChatWnd contains no properties or methods
(I'm Dutch, sorry for my bad English.)

Hello everybody,

I have a problem with my script. Maybe it's WLM 9, because I have the problems since I installed 9.

The problem:
I have made this script (as a test script):

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind){
    Debug.Trace(typeof ChatWnd);
    for (i in ChatWnd) {
        Debug.Trace(ChatWnd[i]);
    }
}


When I send a message to somebody or somebody sends a message to me, i get in the debug window:

object

That's all. It means that ChatWnd contains no properties or methods, what I don't understand. Does anyone have a solution or a cause?

Thanks!
05-10-2008 11:22 AM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: ChatWnd contains no properties or methods
try Debug.Trace(ChatWnd.Handle);

It looks like there are no i in ChatWnd so I'm not sure you can loop it in the same way as arrays and/or some other objects
<Eljay> "Problems encountered: shit blew up" :zippy:
05-10-2008 07:36 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: ChatWnd contains no properties or methods
ChatWnd is not an array it is an Object.

Therefore you have to append the properties, you cannot look through them.
05-11-2008 01:30 AM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: ChatWnd contains no properties or methods
quote:
Originally posted by matty
ChatWnd is not an array it is an Object.

Therefore you have to append the properties, you cannot look through them.

But on an object you create your self you can :p
<Eljay> "Problems encountered: shit blew up" :zippy:
05-11-2008 08:15 AM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: ChatWnd contains no properties or methods
Yep, but MsgPlus objects aren't like normal objects... There's a difference...

That's also the reason why you can't add your own properties to them (like you can with 'normal' objects).
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-12-2008 12:21 AM
Profile PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: ChatWnd contains no properties or methods
quote:
Originally posted by CookieRevised
Yep, but MsgPlus objects aren't like normal objects... There's a difference...

That's also the reason why you can't add your own properties to them (like you can with 'normal' objects).
Quoted for truth. It would be much cooler if we could append our own functions to objects like the PlusWnd object (if it was an object). Then, we could make object-oriented things like "PlusWnd.LstView_SetColumn" or "PlusWnd.LstView_Sort" instead of passing the PlusWnd object to a function. We could write some kind of library or framework for Plus! scripts, like the Prototype JS does for the Document Object Model. :)

Aah, think of the possibilities... :P

This post was edited on 05-12-2008 at 10:48 AM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
05-12-2008 10:47 AM
Profile E-Mail PM Web Find Quote Report
Jeroen Noten
New Member
*


Posts: 8
Joined: Aug 2006
O.P. RE: ChatWnd contains no properties or methods
Thanks everybody! (And sorry for my late reply.)
06-29-2008 09:17 PM
Profile E-Mail PM 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