Shoutbox

line break in Message.replace? - 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: line break in Message.replace? (/showthread.php?tid=74403)

line break in Message.replace? by hofasackl on 05-15-2007 at 05:48 PM

is it possible to make a line break in Message.replace?

like this:

code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
    Message = Message.replace(/\test\:/gi,'some text here *a line break here* and some text here');
    return Message;
}

RE: line break in Message.replace? by Stigmata on 05-15-2007 at 06:00 PM

tried \r\n ??

code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
Message = Message.replace(/\test\:/gi,'some text here\r\nand some text here');
return Message;
}


Haven't tried it, but if it doesnt work give us the heads up and I'll look for alternatives
RE: line break in Message.replace? by hofasackl on 05-15-2007 at 06:03 PM

perfect - it's working : )

thanks


RE: line break in Message.replace? by Stigmata on 05-15-2007 at 06:09 PM

No problem son, glad I could help