Shoutbox

Buttons - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Buttons (/showthread.php?tid=93664)

Buttons by c_clarky_89 on 01-25-2010 at 05:45 AM

I have a menu window that opens when you select it from the script menu and im struggling to get another window to open when you click on the button thats on the menu :(

Can anybody help please :)


RE: Buttons by matty on 01-25-2010 at 02:06 PM

Post your code because your question is leaving me with far too many to be able to answer...


RE: Buttons by c_clarky_89 on 01-26-2010 at 01:48 AM

Here's the coding:

Download:


RE: Buttons by matty on 01-26-2010 at 02:19 AM

It won't work. Post the PLSC here...


RE: Buttons by c_clarky_89 on 01-26-2010 at 02:33 AM

Here's The Coding:


RE: Buttons by matty on 01-26-2010 at 03:53 AM

I don't get what mean. I opened the script from the menu and it works fine. Try and explain in more detail what you are trying to do...


RE: Buttons by c_clarky_89 on 01-26-2010 at 03:57 AM

when you chose 'Create...' from the menu when you click the 'Letters' button i want the letters window to appear :P


RE: Buttons by matty on 01-26-2010 at 12:42 PM

So you are trying to make the different windows for each of the different groups of things you can do?


RE: Buttons by c_clarky_89 on 01-26-2010 at 03:32 PM

yep :D when you click letters the letters window will appear when you click symbols the symbol window will appear... etc :P


RE: Buttons by matty on 01-26-2010 at 03:44 PM

What have you tried so far?

Also out of curiosity why did you revert all the changes I had made to the script? I had cut the length of the code down significantly... from 977 lines to 139... that doesn't make any sense...


RE: Buttons by c_clarky_89 on 01-26-2010 at 07:22 PM

Im not using your coding because the personal message dont show in the drop down box unless you have a pm existing which isnt how i want it to work :( and when i want to change the letters or symbols i dont know how to change them :(

This is the JS code ive tryed:

code:
function OnWndMenuEvent_CtrlClicked(Wnd, ControlId)
{
    if(ControlId == "BtnLetters")
    {
    Wnd = MsgPlus.CreateWnd("Letters.xml", "WndLetters");
    }
}

This is he XML code ive tryed:

code:
        <Control xsi:type="ButtonControl" Id="BtnLetters">
            <Position Top="10" Width="80" Left="10"/>
            <Caption>&amp;Letters</Caption>
        </Control>


RE: Buttons by matty on 01-26-2010 at 07:50 PM

The code I wrote you just need to delete these 2 lines:

Javascript code:
    if (Messenger.MyName !== '')        Wnd.Combo_AddItem('NamePm', 'Name');
    if (Messenger.MyPersonalMessage !== '')        Wnd.Combo_AddItem('NamePm', 'Personal Message');

Change to :
Javascript code:
    Wnd.Combo_AddItem('NamePm', 'Name');
    Wnd.Combo_AddItem('NamePm', 'Personal Message');


quote:
Originally posted by c_clarky_89
and when i want to change the letters or symbols i dont know how to change them :(
You dont need to do anything aside from add another button that follows the name of BtnChar.

As for your question:

Don't assign the variable of the window to the same name as a parameter passed...
Meaning create another variable to store the windows object in. Or the window has an error and wont create...
RE: Buttons by c_clarky_89 on 01-27-2010 at 05:58 PM

ive done the changes im now using the one that you shortend for me :D i dont get the last bit about the varibles :(


RE: Buttons by matty on 01-27-2010 at 06:34 PM

Javascript code:
function OnWndMenuEvent_CtrlClicked(Wnd, ControlId){
    if(ControlId == "BtnLetters")
    {
    Wnd = MsgPlus.CreateWnd("Letters.xml", "WndLetters");    }
}

You are using Wnd twice that isn't the problem but that is a no no.
Does the window open at all? If not what shows in the debug window?
RE: Buttons by c_clarky_89 on 01-28-2010 at 03:22 AM

When i click on Create... that window appears and when i click on the Letters button nothing happens :(

This is what i get in the debug window when i click the Letters button:

Javascript code:
Function called: OnWndMainEvent_CtrlClicked


RE: Buttons by matty on 01-28-2010 at 04:36 AM

Post your script and I will take a look...


RE: Buttons by c_clarky_89 on 02-04-2010 at 06:41 AM

Hope you can help :P

Here's The Script:


RE: Buttons by matty on 02-04-2010 at 01:51 PM

So after quickly looking at it you simply copied a bunch of code to different files...

This is a huge mess. I will see what I can do later.


RE: Buttons by c_clarky_89 on 02-05-2010 at 09:09 PM

it isnt a mess at all and i didnt just copy a bunch of code to a different file i have tryed doing the coding for the buttons but it wont work for me i put the coding into a different file because thats what i thought you had to do.