What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » WLM Plus! Bug Reports » RemoveFormatCodes

RemoveFormatCodes
Author: Message:
Noixe
Junior Member
**


Posts: 25
– / Male / Flag
Joined: Jul 2008
O.P. RemoveFormatCodes
Hello,

I have create a simple function to see the result of RemoveFormatCodes:

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind) {

    MsgPlus.DisplayToast("Test", ("abcdefghi" == MsgPlus.RemoveFormatCodes(Message)));

                MsgPlus.DisplayToast("Test",  MsgPlus.RemoveFormatCodes(Message));


                           
}

But when I  receive message colored with my script "Random Gradiator" (using Bidirectional Gradation mode), the result of first toast window is "false":

For example, i write:

abcdefghi

it was sent with format code and i see it with color but in the second toast window I see:

abcd    efghi


I have tried to write manually the code generated by Random Gradiator :

MyMsg = "[.b][c=1]abcd[/c=2][c=2]efghi[/c=1][/b.]"

MsgPlus.DisplayToast("Test",  MsgPlus.RemoveFormatCodes(MyMsg));

but in this way the message printed is correct (without spaces).


This is a function used by script to insert color codes:

msg1 = Messaggio.substr(0, Messaggio.length / 2);
msg2 = Messaggio.substr(Messaggio.length / 2);

return BIU_a[form] + "[c=" + c1 + "]" + msg1 + "[/c=" + c2 + "]" +
                            "[c=" + c2 + "]" + msg2 + "[/c=" + c1 + "]" + BIU_c[form];

where c1 and c2 are a numbers

BIU_a is an array with the open tag: [.b], [.i], [.u], etc...

BIU_c is an array with the close tag: [/b.], [/i.], [/u.], etc..

if you want see the source you can download it from:

http://www.msgpluslive.it/scripts/view/429-Random-Gradiator

Thanks

P.S.: I have add the dots in the tag to make it visible.


This post was edited on 08-17-2008 at 12:01 PM by Noixe.
08-17-2008 11:57 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
RemoveFormatCodes - by Noixe on 08-17-2008 at 11:57 AM
RE: RemoveFormatCodes - by Spunky on 08-17-2008 at 03:54 PM
RE: RE: RemoveFormatCodes - by Noixe on 08-17-2008 at 04:36 PM
RE: RemoveFormatCodes - by Felu on 08-17-2008 at 04:46 PM
RE: RemoveFormatCodes - by Noixe on 08-17-2008 at 08:47 PM
RE: RemoveFormatCodes - by CookieRevised on 08-17-2008 at 10:07 PM
RE: RemoveFormatCodes - by Noixe on 08-18-2008 at 09:11 AM
RE: RemoveFormatCodes - by CookieRevised on 08-18-2008 at 05:22 PM
RE: RemoveFormatCodes - by Noixe on 08-18-2008 at 08:10 PM


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