What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » New line problem, when \n doesn't work!

New line problem, when \n doesn't work!
Author: Message:
Saki
New Member
*


Posts: 6
Joined: Apr 2009
O.P. Happy  New line problem, when \n doesn't work!
Hi all
I have a problem when I already read messages from XML file.
Each messages combined multi-sentence and "\n" to tell messages go to new line. Then I will send that messages to chat window. The result does not make new line like I planed.

Here is my XML file sample (test.xml)
<root>
    <node>Hello, I saw you continuely online more than 60 minutes.\nPlease take a little time to break for your good healthy.\nI'm also apologize for this interupt, this is testing</node>
    <node>bra bra...2 \nbra bra..</node>
    <node>bra bra...3 \nbra bra..</node>
    <node>bra bra...4 \nbra bra..</node>
</root>


Here is my code
function OnEvent_Initialize(MessengerStart)
{
    var Email = "sakpong@live.com";
        var file     = MsgPlus.ScriptFilesPath+"\\test.xml";
    var rootXML = XMLNewRequest(file);
    var aMsg = rootXML.childNodes.item(0);

    var bMsg = "Hello, I saw you continuely online more than 60 minutes.\nPlease take a little time to break for your good healthy.\nI'm also apologize for this interupt, this is testing";

    Messenger.OpenChat(Email).EditText_ReplaceSel(aMsg));
}


Here is chat window's result from case that aMsg is read from XML.
Hello, I saw you continuely online more than 60 minutes.\nPlease take a little time to break for your good healthy.\nI'm also apologize for this interupt, this is testing

Here is chat window's result from case that bMsg is string variable.
This result is I want it be. But I can't fixed all data in script like this case.
Hello, I saw you continuely online more than 60 minutes.
Please take a little time to break for your good healthy.
I'm also apologize for this interupt, this is testing


I try to use String()'s function with aMsg but it's still not work.
Someone help me please.

Thank you so much.

Also I attached this test script, but code still be confuse. Because it's in testing and many dummy functions are in code. Also XML data mostly represent in Thai language.

.plsc File Attachment: XMLtest.plsc (6.22 KB)
This file has been downloaded 108 time(s).

This post was edited on 05-02-2009 at 12:09 AM by Saki.
05-01-2009 06:41 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
New line problem, when \n doesn't work! - by Saki on 05-01-2009 at 06:41 PM
RE: New line problem, when \n doesn't work! - by ShawnZ on 05-01-2009 at 08:00 PM
RE: RE: New line problem, when \n doesn't work! - by Saki on 05-02-2009 at 12:09 AM
RE: New line problem, when \n doesn't work! - by NanaFreak on 05-02-2009 at 11:39 AM
RE: New line problem, when \n doesn't work! - by SmokingCookie on 05-05-2009 at 11:27 AM


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