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

Pages: (2): « First [ 1 ] 2 » Last »
Interface help
Author: Message:
plus
Banned


Posts: 127
Reputation: -10
Joined: Jan 2007
O.P. Interface help
This might be alot to ask. I have being trying to create a script that works, its almost done.
I  am stuck on the interface window how can i make it so theres a text box that when i click save it will change the word test (below) to the text that is inputed in the box.

code:
    function OnEvent_ChatWndSendMessage(ChatWnd, sMessage)
    {
       return sMessage.replace("hi", "test");
    }



one more thing,

Is there a way if somone types web (example) the script will send back wed2

Thanks in advance(Y)

This post was edited on 01-15-2007 at 08:53 PM by plus.
01-15-2007 08:52 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Interface help
Have you read and looked at the examples in the Scripting Documentation for windows?

We can't keep giving you the answers!
01-15-2007 09:33 PM
Profile E-Mail PM Find Quote Report
plus
Banned


Posts: 127
Reputation: -10
Joined: Jan 2007
O.P. RE: Interface help
Yes i am sorry but i dont understand it. Most of it i do but most i dont.
01-15-2007 09:39 PM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: RE: Interface help
quote:
Originally posted by .2007
Most of it i do but most i dont.

....what's that supposed to mean? :P

Why don't you search the forums and look at other scripts for examples before you keep posting? It'll really help, and you'll probably learn a lot more than if we just continue to post code for you :P

This post was edited on 01-15-2007 at 09:52 PM by deAd.
01-15-2007 09:49 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Interface help
Unless you post code that you have tried I wont give you any. I will fix it if you post it.
01-15-2007 09:51 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Interface help
What is there to not understand?

Tackle your problem step by step with logic questions, and you'll see that what you ask here is actually extremely easy...

Problem: You need to get a string from 'somewhere' so you can use it to replace a text.

How you should think:
1) That 'somewhere' is a textbox
2) A textbox is a control placed on a Plus! window
3) How do you grab text from a control placed on a Plus! window? See Plus! scripting documentation 'The PlusWnd Object'...
4) Simply take a look at the list of all the properties and functions from this object in the documentation and you'll notice the function "GetControlText", click on the link to read the details about this function.

Second problem: How to catch a button press
How you should think: Similar to the first problem and look up Events Reference > Interface Windows Events
No rocket science involved here, just some logic sense and reading...

PS: and look at other scripts...

Learn to self-study and look things up.

PS: It is not that we don't want to help, it is just that by giving you straight answers you will not learn to do anything yourself.

This post was edited on 07-19-2008 at 08:21 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
01-15-2007 09:53 PM
Profile PM Find Quote Report
plus
Banned


Posts: 127
Reputation: -10
Joined: Jan 2007
O.P. RE: Interface help
I look up the first one and got,
Syntax
[string] GetControlText(
    [string] ControlId
);

How dose that help....
01-15-2007 10:05 PM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: RE: Interface help
quote:
Originally posted by .2007
I look up the first one and got,
Syntax
[string] GetControlText(
    [string] ControlId
);

How dose that help....

Well that tells you how to call it and what it returns...it's part of the PlusWnd object so you'd call it from a PlusWnd object instance. That definition also shows you what the parameters are. There's a description of each parameter below too that goes into more detail.

This post was edited on 01-15-2007 at 10:52 PM by deAd.
01-15-2007 10:51 PM
Profile PM Find Quote Report
plus
Banned


Posts: 127
Reputation: -10
Joined: Jan 2007
O.P. RE: Interface help
Do i copy it into the script then it will make a interface window
01-15-2007 10:56 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Interface help
quote:
Originally posted by .2007
Do i copy it into the script then it will make a interface window
No, you need to create an Interface window in XML.

code:
<Interfaces xmlns="urn:msgplus:interface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:msgplus:interface PlusInterface.xsd">
   
<Window Id="SoundTransfer400" Version="1">
    <Attributes>
        <ShowInTaskbar>false</ShowInTaskbar>
    </Attributes>
   
    <TitleBar>
        <AllowMinimize>false</AllowMinimize>
        <AllowClose>false</AllowClose>
    </TitleBar>
   
    <Position Width="200" Height="60"/>
   
    <DialogTmpl>   
        <BottomBar Style="None">
            <LeftControls>
                <Control xsi:type="ProgressControl" Id="PrgWait">
                     <Position Top="5" Width="100" Left="0" Height="10"/>
                    <Marquee/>
                </Control>
            </LeftControls>

            <RightControls>
                <Control xsi:type="ButtonControl" Id="BtnCancel">
                    <Position Top="0" Width="50" Left="0"/>
                    <Caption>&amp;Cancel</Caption>
                </Control>
            </RightControls>
        </BottomBar>
    </DialogTmpl>
   
    <Elements>
        <Element xsi:type="ImageElement" Id="ImgSound">
            <Position Top="5" Left="6"/>
            <Image><Name>icon-speaker</Name></Image>
        </Element>
    </Elements>
   
    <Controls>
        <Control xsi:type="StaticControl" Id="LblMessage">
            <Position Top="5" Width="150" Left="32" Height="20"/>
            <Attributes>
                <WrapText>true</WrapText>
            </Attributes>
            <Caption>Please wait...\nThe sound is being sent.</Caption>
        </Control>
    </Controls>
</Window>

</Interfaces>


Taken right from the scripting documentation

This post was edited on 01-15-2007 at 11:33 PM by matty.
01-15-2007 11:02 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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