Shoutbox

Scripting Error - 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: Scripting Error (/showthread.php?tid=90121)

Scripting Error by c_clarky_89 on 04-11-2009 at 06:07 PM

when i debug my script i get this error and i dont no what it is someone help me please :D

Function called: OnEvent_Uninitialize
Error: 'Wnd' is null or not an object (code: -2146823281)
       File: WLNameEditor.js. Line: 40.
Function OnEvent_Uninitialize returned an error. Code: -2147352567
Script has been stopped
Script is starting
Script is now loaded and ready


RE: Scripting Error by Spunky on 04-11-2009 at 07:24 PM

quote:
code:
'Wnd' is null or not an object


Either you are not creating the window properly, or the XML file contains an error. Have you saved the XML file as Unicode in Notepad?

If you have, post the relevant code and XML file here and I'll take a look
RE: Scripting Error by c_clarky_89 on 04-11-2009 at 08:32 PM

Here's the files :D:

Download: WLNameEditor


RE: Scripting Error by matty on 04-12-2009 at 01:15 AM

The reason you are getting the error is if the variable has not been assigned then .Close is not a valid method.

You do not need to actually close any windows on Uninitialize because the three instances where this is called are the following:
- User signs out
- User disables script
- Another script is imported

If one of these instances occurs the script engine is stopped and all windows are closed.

Also when you are closing a window you need to pass a valid exit code.


RE: Scripting Error by c_clarky_89 on 04-12-2009 at 01:37 AM

sorted now thank you :D


RE: Scripting Error by warmth on 11-22-2009 at 11:39 PM

wlnameeditor is not loading the PSM when you select it on the settings... can you please fix it?


RE: Scripting Error by c_clarky_89 on 11-24-2009 at 10:19 PM

can someone help me with this error please i have no idea where it is i cant find nothing :(


RE: Scripting Error by matty on 11-25-2009 at 03:19 PM

Well I took the liberty of cleaning some of this up...

Notice the highlighted code. I changed the xml so that all the special character buttons are prefixed with BtnChar and wrote a regex to get the colour from the button.

Removed the code no longer needed


RE: Scripting Error by matty on 11-25-2009 at 03:22 PM

Removed the code no longer needed


RE: Scripting Error by c_clarky_89 on 12-08-2009 at 01:04 PM

It's still doing it with the pm :( ive tryed my other versions that i had no problems with and they are doing it as well (N) plus i downloaded some other name editors and they are doin the same :O so im wondering if its got something to do with windows live its self? :S


RE: Scripting Error by matty on 12-08-2009 at 03:23 PM

What exactly is happening with the PSMs?


RE: Scripting Error by c_clarky_89 on 12-09-2009 at 04:33 PM

When you load the WLNameEditor and select Personal Message sometimes the pm wont show in the box on the WLNameEditor even though you have 1 :S

It does this on all the name editors not just mine :S


RE: Scripting Error by matty on 12-09-2009 at 06:13 PM

Ok sorry I have never used this before but when you select PSM from the drop down it should populate the edit box with your current PSM to edit it?

Try changing/updating the function to this:

js code:
function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd)
{
    if(MenuItemId == "MnuStart")
    {
        Wnd = MsgPlus.CreateWnd("WLNameEditor.xml", "WndMain");
        Wnd.SetControlText("NameEdit", Messenger.MyName);
        Wnd.SetControlText("NameEditPreview", Messenger.MyName);
        Wnd.SendControlMessage('NameEdit', 0xC5, 129, 0);
        Wnd.Combo_AddItem("NamePm", "Name");
        Wnd.Combo_AddItem("NamePm", "Personal Message");
        Wnd.Combo_SetCurSel("NamePm", 0);
>>>        OnWndMainEvent_ComboSelChanged(Wnd, 'NamePm');<<<
        //Wnd.ImageElmt_SetImageFile("emoticon", "WLM_1");
        var len = Wnd.GetControlText("NameEdit").length;
        var EM_SETSEL = 0xB1;
        Interop.Call("user32","SetFocus", Wnd.GetControlHandle("NameEdit"));
        Interop.Call("user32","SendMessageW", Wnd.GetControlHandle("NameEdit"), EM_SETSEL, len, len);
    }
}

function OnWndMainEvent_ComboSelChanged(pPlusWnd, sControlId) 
{
    switch (pPlusWNd.Combo_GetCurSel(sControlId)) {
        case 0:
            pPlusWnd.SetControlText("NameEdit", Messenger.MyName);
            break;
        case 1:
            pPlusWnd.SetControlText("NameEdit", Messenger.MyPersonalMessage);
            break;
        default: // -1
            break;
    }
}

RE: Scripting Error by c_clarky_89 on 12-11-2009 at 02:31 AM

that code doesnt work, when I select personal message from the drop down box nothing happens :(


RE: Scripting Error by matty on 12-11-2009 at 05:12 AM

Try this out and see how it works. I updated a lot.

Also The build and build id have been changed if you want to put it in the database.


RE: Scripting Error by c_clarky_89 on 12-12-2009 at 10:23 PM

theres a problem with that script name & personal message has doubled up in the frop down box :(


RE: Scripting Error by matty on 12-13-2009 at 02:09 AM

Oh I forgot. I hard coded them in the XML. Remove it from there or from the JS file and it will be ok.


RE: Scripting Error by c_clarky_89 on 12-13-2009 at 02:32 AM

sorted that but now theres another error when i click on the emoticon it comes up saying undefind :(


RE: Scripting Error by matty on 12-13-2009 at 02:54 AM

Change line 100 from this:

js code:
s = MapCodesToEmoticonNames[ControlId];

To this:
js code:
s = MapCodesToEmoticonNames(ControlId);

RE: Scripting Error by c_clarky_89 on 12-13-2009 at 02:51 PM

the personal message still dont show when seleted from the drop down box :( it works sometimes but then it jus happens again :(


RE: Scripting Error by matty on 12-14-2009 at 12:29 PM

That is extremely weird as it worked here without problems...


RE: Scripting Error by c_clarky_89 on 12-14-2009 at 12:31 PM

give it chance and it might do it dosen't do it everytime it does it every so often :(


RE: Scripting Error by matty on 12-14-2009 at 01:52 PM

quote:
Originally posted by c_clarky_89
give it chance and it might do it dosen't do it everytime it does it every so often :(
Can you explain the steps to reproduce? Is it the first time you have the script window open? Does it happen after changing your PSM? As much detail as possible would be great to help me help you fix your script.
RE: Scripting Error by c_clarky_89 on 12-14-2009 at 02:23 PM

i install the script open it first time i then select Personal Message from the drop down box and it would work fine, it would work fine for a few more times (this is just selecting Personal Message from drop down i dont change the PSM) after a few more times it doesnt show the PSM in the edit box after selecting it from the drop down box it does this 2 or 3 times and then it works fine again and then after a few more times it starts to do it again :(


RE: Scripting Error by c_clarky_89 on 12-17-2009 at 10:02 PM

Anyone?? 8-)


RE: Scripting Error by matty on 12-18-2009 at 02:08 AM

That is really weird. I cannot reproduce it at all.


RE: Scripting Error by c_clarky_89 on 12-18-2009 at 02:10 AM

what you mean? you can't find out what the problem is or is it not doing it for you? :O

its not just mine whats doing it its the other name editors to :S its really wierd :O


RE: Scripting Error by matty on 12-18-2009 at 02:14 AM

Mine works 100% of the time.


RE: Scripting Error by c_clarky_89 on 12-18-2009 at 02:16 AM

my friends said that it does the same thing it does to me with 1 of them but the other one they said it wors fine :S


RE: Scripting Error by SourSpud on 12-18-2009 at 11:50 AM

I tested it and its doing exactly the same thing for me, its not showing the PSM when i choose it from the drop down menu.


RE: Scripting Error by matty on 12-18-2009 at 12:53 PM

quote:
Originally posted by SourSpud
I tested it and its doing exactly the same thing for me, its not showing the PSM when i choose it from the drop down menu.
Is that the first time you opened it? I can't see any reason for that.
RE: Scripting Error by warmth on 12-18-2009 at 04:28 PM

I happening the same here... double "Name" appearing and just the Display name is loaded in the box...


RE: Scripting Error by matty on 01-13-2010 at 02:03 PM

The double name is fixed (my bad).

This update is really just for Cyril to try and find the bug.

What version of WLM is everyone using. What Language is it as well?


RE: Scripting Error by warmth on 01-13-2010 at 02:34 PM

Windows 7 Ultimate (6.1.7600) in spanish
Windows Live Messenger 14.0.0726 in spanish
Messenger Plus! Live 4.83.0.376 in spanish
MessengerDiscovery 2.5.82 in english
Skin: Messenger Live Toolbox 5.1 in english


RE: Scripting Error by c_clarky_89 on 01-13-2010 at 03:37 PM

Windows 7 Home Premium x64 (6.1.7600) - English
Windows Live Messenger 14.0.0726 - English
Messenger Plus! Live 4.83.0.375 - English


RE: Scripting Error by c_clarky_89 on 01-16-2010 at 01:13 AM

matty the pm option from the drop down box is missing? :(


RE: Scripting Error by matty on 01-16-2010 at 04:32 PM

I realize that now actually. I had it set to only show the option if a PSM exists...


RE: Scripting Error by warmth on 01-16-2010 at 06:34 PM

any news about a fixed version?


RE: Scripting Error by c_clarky_89 on 01-17-2010 at 01:15 AM

Not yet still working on it :( i think something has been changed on the latest update of msn because before that update there was no problems :D


RE: Scripting Error by c_clarky_89 on 03-22-2010 at 12:07 AM

Anybody any ideas on what this problem is yet? :(


RE: Scripting Error by matty on 03-22-2010 at 01:01 PM

It is a bug in the engine. Plus! doesn't know what the PSM is until it is changed. I don't suspect you to see a fix for this until Plus! 5 however I could be mistaken. They may release a fix in the next build they release (potentially).