What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [!REQUEST!] very simple, but I can't

[!REQUEST!] very simple, but I can't
Author: Message:
tribbium
Junior Member
**


Posts: 34
Reputation: 3
– / Male / Flag
Joined: Jul 2008
RE: [!REQUEST!] very simple, but I can't
Here's some simple code that will get what you want done. You can modify it to change the titles/headers or whatnot.

XML file (save in Unicode)
quote:
<Interfaces xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance">
<Window Id = "WindowA" Version = "1">
    <Attributes>
        <Caption>Caption Here</Caption>
    </Attributes>

    <TitleBar>
        <Title><Text>Title Here</Text></Title>
    </TitleBar>

    <Position ClientWidth = "200" ClientHeight = "68"/>

    <Controls>
        <Control xsi:type = "StaticControl" Id = "Label">
            <Position Left = "10" Top = "20" Width = "150"/>
            <Caption>Hoeveel geld heb je gerkregen?</Caption>
        </Control>
        <Control xsi:type = "EditControl" Id = "EditFld">
            <Position Left = "10" Top = "35" Width = "180"/>
        </Control>
        <Control xsi:type = "ButtonControl" Id = "OkBtn">
            <Position Left = "150" Top = "50" Width = "40"/>
            <Caption>Ok</Caption>
        </Control>
    </Controls>
</Window>
</Interfaces>

To open the window, use this line
quote:
MsgPlus.CreateWnd("ExampleWnd.xml", "WindowA");

To get the info, you'll need a function
quote:
function OnWindowAEvent_CtrlClicked (PlusWnd, ControlId)
{
    if (ControlId == "OkBtn")
    {
        PlusWnd.GetControlText ("EditFld");
    }
}

The line PlusWnd.GetControlText ("EditFld") will return you a String, and you can handle that however you wish. You might want to dummy proof and make sure that the field isn't blank or that they don't preemptively close the window.
Are you and your friends trivia enthusiasts? Download Tribbium! http://www.msgpluslive.net/scripts/view/427-Tribb...ia-Gaming-System)/

Download questions for Tribbium here:
http://www.tribbium.tk
07-20-2008 02:25 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[!REQUEST!] very simple, but I can't - by bramvandeperre on 07-20-2008 at 01:55 PM
RE: [!REQUEST!] very simple, but I can't - by tribbium on 07-20-2008 at 02:25 PM
RE: [!REQUEST!] very simple, but I can't - by bramvandeperre on 07-20-2008 at 02:28 PM


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