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

Help With Scripting Please!
Author: Message:
Malekith
Junior Member
**


Posts: 30
– / Male / Flag
Joined: Feb 2007
O.P. Help With Scripting Please!
I need some help with some scripting, before i explain heres part of my code:

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, Type) {
    var Contacts = ChatWnd.Contacts;
    var e = new Enumerator(Contacts);
    var Contact = e.item();

    var command = Message.substr(0,7);
    var strMessage = Message.substr(8);
   
    if (ChatOpen != true) {
        if (command == "!secure") {
            var ContactEmail = Contact.Email;
            var Wnd = MsgPlus.CreateWnd("Interface.xml", "WndMain");
            var ChatWindowID = ChatWnd;
            Wnd.SetControlText("lblChatting",ContactEmail)
            ChatOpen = true;
        }
    }
   
    if (Contact.Email != Messenger.MyEmail) {
        var strCurrentChat = Wnd.GetControlText("txtChat");
        Wnd.SetControlText("txtChat","<" + Contact.Email + "> " + Message + "\r\n");
    }
   
    return Message;
}

What i want to do is make Wnd a constant/global variable so i can always access it because i need to keep using it everytime a message is recieved. So what im asking is if there is a way to make global variables OR if i can iterate through the windows and find the one with the id of WndMain. I really need help with this, thanks.

/-- Malekith
02-02-2007 12:49 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help With Scripting Please! - by Malekith on 02-02-2007 at 12:49 AM
RE: Help With Scripting Please! - by roflmao456 on 02-02-2007 at 12:51 AM
RE: Help With Scripting Please! - by Malekith on 02-02-2007 at 12:57 AM
RE: Help With Scripting Please! - by roflmao456 on 02-02-2007 at 12:59 AM
RE: Help With Scripting Please! - by NanaFreak on 02-02-2007 at 01:00 AM
RE: Help With Scripting Please! - by Malekith on 02-02-2007 at 01:07 AM


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