What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] How do I do this contact thingy?

[?] How do I do this contact thingy?
Author: Message:
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
29 / Male / Flag
Joined: Nov 2006
Status: Away
O.P. [?] How do I do this contact thingy?
I'm wondering how i can make an interface window with a list of my contacts and an OK button that does some action with the selected contacts and Cancel button?

i really do not know how to do this.. lool

so if someone can help me, thanks :)
[quote]
Ultimatess6
: What a noob mod
01-30-2007 02:47 AM
Profile PM Web Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
29 / Male / Flag
Joined: Apr 2006
Status: Away
RE: [?] How do I do this contact thingy?
Create a List View Control and add the contacts to it. You can use Messenger.MyContacts for getting the contacts.
Here is an example of how i do it in @ScriptDev.
code:
<Window Id="WndSend" Version="1">
        <Attributes>
            <ShowInTaskbar>false</ShowInTaskbar>
            <TopMost>true</TopMost>
        </Attributes>
        <TitleBar>
            <AllowMinimize>false</AllowMinimize>
        </TitleBar>
        <Position Width="180" Height="200">
            <Resizeable Allowed="BothSides">
                <MinWidth>300</MinWidth>
                <MinHeight>200</MinHeight>
            </Resizeable>
        </Position>
        <DialogTmpl>
            <BottomBar Style="None">
                <RightControls>
                    <Control xsi:type="ButtonControl" Id="BtnSend">
                        <Position Top="0" Width="60" Left="0"></Position>
                        <Attributes><IsDefault>true</IsDefault></Attributes>
                        <Image Margin="5"><Name>buddy-script</Name></Image>
                        <Caption>Send</Caption>
                        <Help>Send to Selected Contacts</Help>
                    </Control>
                    <Control xsi:type="ButtonControl" Id="BtnCancel">
                        <Position Top="0" Width="60" Left="0"></Position>
                        <Image Margin="5"><Name>sounds-delete2</Name></Image>
                        <Caption>Close</Caption>
                        <Help>Close this window</Help>
                    </Control>
                </RightControls>
            </BottomBar>
        </DialogTmpl>
        <Elements/>
        <Controls>
            <Control xsi:type="ListViewControl" Id="Contacts">
                <Position Top="18" Left="10" Width="150" Height="150">
                    <Anchor Vertical="TopBottomFixed"/>
                </Position>
                <Attributes>
                    <AutoTip>true</AutoTip>
                    <AlwaysShowSelection>true</AlwaysShowSelection>
                </Attributes>
                <ReportView>
                    <ColumnHeader>false</ColumnHeader>
                    <FullRowSelect>true</FullRowSelect>
                    <HasCheckboxes>true</HasCheckboxes>
                </ReportView>
                <Images>
                    <SmallIcons>
                        <Image Id="Online">
                            <Name>buddy-online</Name>
                        </Image>
                        <Image Id="Busy">
                            <Name>buddy-busy</Name>
                        </Image>
                        <Image Id="Away">
                            <Name>buddy-away</Name>
                        </Image>
                    </SmallIcons>
                </Images>
                <Columns WidthFormat="Absolute">
                    <Column>
                        <ColumnId>contacts</ColumnId>
                    </Column>
                </Columns>
            </Control>
        </Controls>
    </Window>
code:
var StatusImg = new Array('', '', '', 'Online', 'Busy', 'Away', 'Away', 'Away', 'Busy', 'Away');
function Send2ContactWnd(){
    SendWnd = MsgPlus.CreateWnd("Interface.xml", "WndSend");
    LoadWndLang(SendWnd, "WndSend");
    Contacts = new Array();
    for(var e = new Enumerator(Messenger.MyContacts); !e.atEnd(); e.moveNext()){
        var Contact = e.item();
        if (Contact.Status > 2 && Contact.Network == 1){
            Contacts[Contacts.length] = Contact.Email;
            SendWnd.LstView_AddItem('Contacts', Contact.Email, 0);
            SendWnd.LstView_SetItemIcon('Contacts', SendWnd.LstView_GetCount('Contacts')-1, StatusImg[Contact.Status], true);        }
    }
}
01-30-2007 05:12 AM
Profile E-Mail PM Web Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
29 / Male / Flag
Joined: Nov 2006
Status: Away
O.P. RE: [?] How do I do this contact thingy?
omg thats soo cool :grin:

gonna use it now :P
[quote]
Ultimatess6
: What a noob mod
01-30-2007 10:57 PM
Profile 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