What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » More help needed *sigh*

More help needed *sigh*
Author: Message:
Fike
Junior Member
**

Avatar
I make scripts.

Posts: 63
– / Male / Flag
Joined: Mar 2011
O.P. More help needed *sigh*
Don't mean to spam the forums with these type threads, but I'm a newb who needs help :P

Say I have this:

function OnEvent_ChatWndSendMessage(pChatWnd, sMessage) {
    if (sMessage.toLowerCase() == "/syshelp") {
        MsgPlus.CreateWnd("SysHelp.xml", "SysHelp");
        return "";
    } else if (sMessage.toLowerCase() == "/wlmver") {
        return (Messenger.Version.toFixed(1)+'.0'+Messenger.VersionBuild);
    } else if (sMessage.toLowerCase() == "/sysinfo") {
        var oSysHelpWnd = MsgPlus.CreateWnd("SysInfo.xml", "SysInfo");
        oSysHelpWnd.SetControlText("WlmVer", Messenger.Version.toFixed(1)+'.0'+Messenger.VersionBuild);
        return "";
    }
}

and I want to add another SetControl, how would I achieve this? I've copy/pasted the same oSysHelpWnd.SetControlText line below it and modified it for my second control but it wont work...
03-19-2011 06:11 PM
Profile E-Mail PM Web Find Quote Report
foaly
Senior Member
****

Avatar

Posts: 718
Reputation: 20
38 / Male / Flag
Joined: Jul 2006
RE: More help needed *sigh*
that actually should work, does the scriptdebugger give any errors?
[signature.jpg]
03-19-2011 06:27 PM
Profile E-Mail PM Find Quote Report
Fike
Junior Member
**

Avatar
I make scripts.

Posts: 63
– / Male / Flag
Joined: Mar 2011
O.P. RE: RE: More help needed *sigh*
quote:
Originally posted by foaly
that actually should work, does the scriptdebugger give any errors?

Nope.
03-19-2011 06:36 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: More help needed *sigh*
You mean you did this:
code:
var oSysHelpWnd = MsgPlus.CreateWnd("SysInfo.xml", "SysInfo");
oSysHelpWnd.SetControlText("WlmVer", Messenger.Version.toFixed(1)+'.0'+Messenger.VersionBuild);
oSysHelpWnd.SetControlText("id_of_whatever_other_control_you_want_to_set_the_text_for", "some text");
return "";
?

Are you sure you actually do have that text control (id_of_whatever_other_control_you_want_to_set_the_text_for) properly defined in SysInfo.xml too?

This post was edited on 03-19-2011 at 08:01 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-19-2011 07:56 PM
Profile PM Find Quote Report
Fike
Junior Member
**

Avatar
I make scripts.

Posts: 63
– / Male / Flag
Joined: Mar 2011
O.P. RE: More help needed *sigh*
Yep.

matty couldn't see anything wrong either.

Here's the current code:

code:
oSysHelpWnd.SetControlText("PlusVer", Messenger.Version.toFixed(1)+'.0'+Messenger.VersionBuild);

This post was edited on 03-19-2011 at 08:06 PM by Fike.
03-19-2011 08:04 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: More help needed *sigh*
Remember: always provide all the related script files if you want people to help you.
(in this case it also means posting the complete code of SysInfo.xml)

;)
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-19-2011 08:08 PM
Profile PM Find Quote Report
Fike
Junior Member
**

Avatar
I make scripts.

Posts: 63
– / Male / Flag
Joined: Mar 2011
O.P. RE: More help needed *sigh*
JS: http://pastebin.com/1cKBEZea
XML: http://pastebin.com/ahurkkBb
03-19-2011 08:10 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: More help needed *sigh*
Worked fine when I ran it here.

(Note I was on a mobile [my blackberry] when I was first looking into it)

js code:
function OnWndTestEvent_CtrlClicked(Wnd, ControlId)
{
    if (ControlId == "BtnClose")
        Wnd.Close(1);
    if (ControlId == "BtnMoreInfo")
        MsgPlus.CreateWnd ("SysInfo.xml", "SysInfo");
}
Also note this code will never get hit because WndTest doesn't exist. Your windows are called SysHelp and SysInfo.

Also a trick is to call your buttons BtnCancel if you want to close a window and Plus! will automatically interpret that as to close the window.

This post was edited on 03-19-2011 at 08:27 PM by matty.
03-19-2011 08:24 PM
Profile E-Mail PM Find Quote Report
Fike
Junior Member
**

Avatar
I make scripts.

Posts: 63
– / Male / Flag
Joined: Mar 2011
O.P. RE: RE: More help needed *sigh*
quote:
Originally posted by matty
Worked fine when I ran it here.

(Note I was on a mobile [my blackberry] when I was first looking into it)

js code:
function OnWndTestEvent_CtrlClicked(Wnd, ControlId)
{
    if (ControlId == "BtnClose")
        Wnd.Close(1);
    if (ControlId == "BtnMoreInfo")
        MsgPlus.CreateWnd ("SysInfo.xml", "SysInfo");
}
Also note this code will never get hit because WndTest doesn't exist. Your windows are called SysHelp and SysInfo.

Also a trick is to call your buttons BtnCancel if you want to close a window and Plus! will automatically interpret that as to close the window.

Ah, it worked for me but only after about 10 seconds :P
03-19-2011 08:36 PM
Profile E-Mail PM Web 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