What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Script Getting Mostly Deleted On Importation

Pages: (2): « First « 1 [ 2 ] Last »
Script Getting Mostly Deleted On Importation
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Script Getting Mostly Deleted On Importation
To set some things strait:

quote:
Originally posted by absorbation
Can you post the source code please :)
download the script pack he posted. No need for anything else ;)

quote:
Originally posted by John Anderton
You could have downloaded the plsc, renamed the extention to zip and extracted it since plsc's are basically .zips :P
That wouldn't have solved his issue as the error is in how the JS file is saved. Even if manually added Plus! will not be able to read the JS file properly.

If you meant he could have attached the JS file directly to his post without making a script pack: helpers could easly extract the files for themselfs (at least they should know how). Also if he did that, he would still have a problem with creating script packs since the XML file wasn't unicode either.

;)

quote:
Originally posted by mickael9
It's the encoding of the js file. It should be AINSI
(I've converted it and it works fine)
As Patchou said, the encoding can perfectly be unicode. In fact it would be a bit better actually. Though the encoding should not matter, but only if the file is encoded properly in ansi or unicode (read further for more)...

-------------------------------------------------------------------------------------

Now for the real deal:

quote:
Originally posted by DarthCrap
what was the original encoding of the js file? EDIT : it was unicode
Actually it wasn't!

quote:
Originally posted by DarthCrap
Any ideas why it was getting mostly deleted in unicode and not in ansi then? :p
Yes... What did you use to create those JScript files?

Because the file was NOT properly written as an unicode file. The characters themselfs were written as unicode but the file itself is missing the special 2 byte unicode header (known as the BOF header) which is mandatory for every proper unicode file.

Since that special header is not present in the file, Plus! does not reconize the file as an unicode file and will simply read it as an ansi text file (since text files do not have that special 2 byte BOF header).

And because Plus! reads it as a normal ansi file, it stops reading after the second byte because that byte (0x00) isn't a proper ascii character and thus only "/" is shown (which was the first character in the file).

In other words, use a proper editor to save your files with (eg: notepad) and you wont have chopped of scripts...


Secondly the error you got that the script couldn't be started is because the file ScriptInfo.xml must be saved in the same encoding as defined in the XML header and this should actually be unicode.

;)

This post was edited on 07-29-2006 at 05:35 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-29-2006 04:19 PM
Profile PM Find Quote Report
DarthCrap
New Member
*


Posts: 8
32 / Male / –
Joined: Jul 2006
O.P. RE: Script Getting Mostly Deleted On Importation
Nice post CookieRevised :p very good explanation

quote:
Originally posted by CookieRevised

Yes... What did you use to create those JScript files?

Because the file was NOT properly written as an unicode file. The characters themselfs were written as unicode but the file itself is missing the special 2 byte unicode header (known as the BOF header) which is mandatory for every proper unicode file.

Since that special header is not present in the file, Plus! does not reconize the file as an unicode file and will simply read it as an ansi text file (since text files do not have that special 2 byte BOF header).

And because Plus! reads it as a normal ansi file, it stops reading after the second byte because that byte (0x00) isn't a proper ascii character and thus only "/" is shown (which was the first character in the file).

In other words, use a proper editor to save your files with (eg: notepad) and you wont have chopped of scripts...


All i did was copy the file as it was from C:\Program Files\Messenger Plus! Live\Scripts\MultipleToaster directory into a folder i created in My Documents, then I packaged it.....

quote:
Originally posted by cookierevised

Secondly the error you got that the script couldn't be started is because the file ScriptInfo.xml must be saved in unicode (it can't be ansi!).

Ok.....
Since starting this thread, i have made another script, which adds a random gradient to text (by using [c=...]text[/c]) tags...
The ScriptInfo.xml file is written in ANSI, and so for that matter is the RandomGradient.js
I have sent the RandomGradient.plsc package to two of my m8s, who have installed it successfully, and even used it in conversations with me :p

This post was edited on 07-29-2006 at 05:04 PM by DarthCrap.
07-29-2006 05:03 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Script Getting Mostly Deleted On Importation
quote:
Originally posted by DarthCrap
All i did was copy the file as it was from C:\Program Files\Messenger Plus! Live\Scripts\MultipleToaster directory into a folder i created in My Documents, then I packaged it.....
Plus! will always create proper unicode files (thus with a BOF header). So something else must have changed the file.

quote:
Originally posted by DarthCrap
The ScriptInfo.xml file is written in ANSI, and so for that matter is the RandomGradient.js
I have sent the RandomGradient.plsc package to two of my m8s, who have installed it successfully, and even used it in conversations with me (Smilie)
That shouldn't be possible if you used the proper format for ScriptInfo.xml which should be unicode and thus the XML header of ScriptInfo.xml must be:
<?xml version="1.0" encoding="UTF-16"?>

not
<?xml version="1.0"?>

It will work atm (as long as your XML header reflects the way you saved the file), but it may also possible that in future updates it will not work anymore. Make it a habit to save in unicode.

This post was edited on 07-29-2006 at 08:43 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-29-2006 05:24 PM
Profile PM Find Quote Report
DarthCrap
New Member
*


Posts: 8
32 / Male / –
Joined: Jul 2006
O.P. RE: RE: Script Getting Mostly Deleted On Importation
quote:
Originally posted by CookieRevised
quote:
Originally posted by DarthCrap
All i did was copy the file as it was from C:\Program Files\Messenger Plus! Live\Scripts\MultipleToaster directory into a folder i created in My Documents, then I packaged it.....
Plus! will always create proper unicode files (thus with a BOF header). So something else must have changed the file.

quote:
Originally posted by DarthCrap
The ScriptInfo.xml file is written in ANSI, and so for that matter is the RandomGradient.js
I have sent the RandomGradient.plsc package to two of my m8s, who have installed it successfully, and even used it in conversations with me (Smilie)
That shouldn't be possible at all either as Plus! will not read ansi xml files.


OK, well the plsc of the randomgradient is attached, just to prove my point :p

.plsc File Attachment: RandomGradient.plsc (943 bytes)
This file has been downloaded 99 time(s).
07-29-2006 05:26 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