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

Create Wnd
Author: Message:
Cryon
New Member
*

Avatar
i'm the king of HTML!!

Posts: 6
– / Male / Flag
Joined: Nov 2007
O.P. Huh?  Create Wnd
i can't use CreateWnd in my script. here is the code:

function OnEvent_Initialize(MessengerStart)
{
    Debug.Trace("Hello World!");
}

function OnEvent_Signin(Email)
{
    if(Email == "jonathan.sweden@hotmail.com") //Change for your sign-in email
    {
    var Message = "Hi Master " + Messenger.MyName + "!";
    Message = MsgPlus.RemoveFormatCodes(Message);
    MsgPlus.DisplayToast("My First Script", Message);
    }
}

function OnEvent_Signout(Email)
{
    if(Email == "jonathan.sweden@hotmail.com") //Change for your sign-in email
    {
    var Message = "Bye Master " + Messenger.MyName + ".";
    Message = MsgPlus.RemoveFormatCodes(Message);
    MsgPlus.DisplayToast("My First Script", Message);
    }
}

function OnGetScriptMenu(Location)
{
    var ScriptMenu = "<ScriptMenu>";
    ScriptMenu += "<MenuEntry Id=\"Options\">Options...</MenuEntry>";
    ScriptMenu += "<Separator/>";
    ScriptMenu += "<MenuEntry Id=\"About\">About...</MenuEntry>";
    ScriptMenu += "</ScriptMenu>"; return ScriptMenu;
}

function OnEvent_MenuClicked(MenuItemId,Location,OriginWnd) {
   switch(MenuItemId) {
      case 'Options':
         toast1();
         break;
      case 'About':
         toast2();
         break;
   }
}


function toast1() {
     Wnd = MsgPlus.CreateWnd("Options.xml", "WndOptions");
}

function toast2() {
    MsgPlus.DisplayToast('My First Script', 'Created by: Cryon\n\Website: http://web.telia.com/~u50701082\n\E-mail: Jonathan.sweden@hotmail.com');
}

function OnEvent_Uninitialize(MessengerExit)
{
    Debug.Trace("Bye World.");
}


it's in "function Toast1()" please help!:(
i'm sorry... i cant much English, i'm from sweden...:S
11-08-2007 05:10 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: Create Wnd
The function toast1, seems to be perfectly fine to me. Do you get any errors in the debug window(I don't think there should be any, but still...).

What is the XML code you are using for the windows? Could you please upload the Options.xml file as an attachment?
11-08-2007 05:28 PM
Profile E-Mail PM Web Find Quote Report
Cryon
New Member
*

Avatar
i'm the king of HTML!!

Posts: 6
– / Male / Flag
Joined: Nov 2007
O.P. RE: Create Wnd
here:
<Interfaces xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Window Id="WndOptions" Version="1">
        <Attributes>
            <Caption>Test Window</Caption>
        </Attributes>
        <TitleBar>
            <Title><Text>Hello!</Text></Title>
        </TitleBar>
        <Position Width="180" Height="75"/>
        <DialogTmpl/>
        <Controls>
            <Control xsi:type="StaticControl" Id="LblTop">
                <Position Left="10" Top="10" Width="150"/>
                <Caption>Hello world!</Caption>
            </Control>
            <Control xsi:type="ButtonControl" Id="BtnClose">
                <Position Left="112" Top="25" Width="50"/>
                <Caption>Close</Caption>
            </Control>
        </Controls>
    </Window>
</Interfaces>

something wrong?
11-08-2007 05:33 PM
Profile E-Mail PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Create Wnd
You might need to save the XML file in Unicode...
<Eljay> "Problems encountered: shit blew up" :zippy:
11-08-2007 06:49 PM
Profile PM Find Quote Report
Cryon
New Member
*

Avatar
i'm the king of HTML!!

Posts: 6
– / Male / Flag
Joined: Nov 2007
O.P. RE: Create Wnd
thanks
now I'm very happy!
11-08-2007 07:26 PM
Profile E-Mail PM Web Find Quote Report
fmonroy
Junior Member
**


Posts: 19
Joined: Jul 2006
RE: Create Wnd
Please set the unicode thing with bolds at the doc.
12-19-2007 12:46 AM
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