Shoutbox

My script doesn't display windows - 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: My script doesn't display windows (/showthread.php?tid=93868)

My script doesn't display windows by QQQ932 on 02-17-2010 at 10:58 AM

Hi all. First of all...sorry for my really bad english ^^.
I tried the following code as the reference suggest, but it doesnt't work

code:
function OnEvent_Initialize(MessengerStart)
{
        var Wnd = MsgPlus.CreateWnd("window.xml", "Wnd");
}

I checked each to arguments, but they're right. Also tried with xml files taken from another scripts, but it doesn't work >.<
RE: My script doesn't display windows by billyy on 02-17-2010 at 12:26 PM

You are trying to show a window at startup?
Isn't that like.. guna anoy people O_O
Further i has tryed the code and all i can think of is that theres a mistake in the xml file or what ever you have typed in the second argument does not match the Window Id.

But i is just a nublet myself :/


RE: My script doesn't display windows by Matti on 02-17-2010 at 12:29 PM

Make sure you've saved your XML file as Unicode (a.k.a. UTF-16 a.k.a. UCS-2 Little Endian).
In Notepad, you select the encoding from the drop-down box in the Save As dialog. In other text editors, you should find a similar option to save as Unicode.


. by QQQ932 on 02-17-2010 at 12:38 PM

I said that the two arguments are right...i checked them >.<
And i said that i tried working xml files from other scripts, too :)


RE: My script doesn't display windows by billyy on 02-17-2010 at 12:46 PM

Well im sorry but something must be wrong, just checking :/
Plus if all that IS indeed right than the problem couldn't be in the script, unless somewhere else.
Maybe the script isnt event activated because of like a bracket mistake, so please make sure all that is okay too.


RE: My script doesn't display windows by matty on 02-17-2010 at 01:55 PM

As Matti said have you made sure that the XML file is saved as Unicode?


RE: My script doesn't display windows by billyy on 02-17-2010 at 02:04 PM

Well he said he took working xml files from other scripts...
So i gues it should be :/


RE: My script doesn't display windows by QQQ932 on 02-17-2010 at 02:19 PM

Here's the debug tracing

quote:
Script in caricamento
Lo script è ora caricato e pronto.
Funzione chiamata: OnEvent_Initialize
It's in italian...it says that the script is loaded and OnEvent_Initialize is called.
There are no traces of errors
RE: My script doesn't display windows by billyy on 02-17-2010 at 02:21 PM

Could you maybe send it?


RE: My script doesn't display windows by matty on 02-17-2010 at 02:22 PM

Can you ZIP all of the files and post them here. Doesn't need to be a PLSC I dont need to import it just need to look over it.


RE: My script doesn't display windows by QQQ932 on 02-17-2010 at 02:25 PM

Sure
Click here


RE: My script doesn't display windows by matty on 02-17-2010 at 02:26 PM

Use the boards attachment feature and zip all the files and post them. Not just the JS file. Post the XML as well.


RE: My script doesn't display windows by billyy on 02-17-2010 at 02:29 PM

I just made a simple xml file and it does open...
So i assume it must be the xml file, like matty said...


RE: My script doesn't display windows by QQQ932 on 02-17-2010 at 02:29 PM

Sorry
Here's the attachment
xml file IS NOT MINE


RE: My script doesn't display windows by matty on 02-17-2010 at 02:31 PM

The problems:

The file is saved as UTF-8 not UTF-16.
The header is wrong in the XML file:

XML code:
<?xml version="1.0" encoding="UTF-16"?>
<Interfaces xmlns="urn:msgplus:interface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:msgplus:interface PlusInterface.xsd">


RE: My script doesn't display windows by QQQ932 on 02-17-2010 at 02:35 PM

O.O
And why does it work with the original script?


RE: My script doesn't display windows by matty on 02-17-2010 at 02:38 PM

It shouldn't work with being UTF-8 that is for sure.


RE: My script doesn't display windows by billyy on 02-17-2010 at 02:41 PM

If you want we might find out with the original script...
But does it realy matter?
Isn't this about fixing YOUR script?

Soowww, does it work nao?


RE: My script doesn't display windows by QQQ932 on 02-17-2010 at 04:57 PM

No. I modified the header and saved the file as Unicode with notepad(I tried all the options exept ANSI)


RE: My script doesn't display windows by billyy on 02-17-2010 at 05:42 PM

Thats strange, your script works fine with any xml file i made...
I used Interface Writer, works fine. (sow i doesn't has to worrie about making mistakes in the xml file)
Maybe you should try that?

Interface Writer (WIN)


RE: My script doesn't display windows by matty on 02-17-2010 at 05:57 PM

quote:
Originally posted by QQQ932
No. I modified the header and saved the file as Unicode with notepad(I tried all the options exept ANSI)
Try using Notepad++ and in the Format menu choose Encode in UCS-2 Little Endian.
RE: My script doesn't display windows by QQQ932 on 02-17-2010 at 07:26 PM

Thx, it works ^^
I'll try Notepad++, too. I didn't know anything about UTF ecc


RE: My script doesn't display windows by billyy on 02-17-2010 at 11:37 PM

yesh it's good stuff, takes a lotta work off yer shoulders :P