Copy link to clipboard
Copied
Hello fellow scripters,
I have been using Err( 'some text' ) to push messages into the console, but I have failed to find the way to add newlines to those messages. If anyone has done that, please enlighten me on this detail.
Thanks
4everJang
Hello Jang,
it's a funny thing:
You could use:
Err( 'some text\n' )
or
Err( 'some text\n' )
In both cases a new line is insertet in consfile.txt, but is NOT shownin the FrameMaker console
If you use
Console("some text\r")
or
Console("some text\n")
it works in both, consfile and console
I normally add '\r' at the start of a new Console() message. If you don't do that your message my get added to the end of anything that's already there.
Ian
Copy link to clipboard
Copied
Hello Jang,
it's a funny thing:
You could use:
Err( 'some text\n' )
or
Err( 'some text\n' )
In both cases a new line is insertet in consfile.txt, but is NOT shownin the FrameMaker console
If you use
Console("some text\r")
or
Console("some text\n")
it works in both, consfile and console
Copy link to clipboard
Copied
I normally add '\r' at the start of a new Console() message. If you don't do that your message my get added to the end of anything that's already there.
Ian
Copy link to clipboard
Copied
I just tried this which did not work:
lsMessage = "Dummy text";
Err (lsMessage + "\r");
Err (lsMessage + "\r");
And not:
lsMessage = "Dummy text";
Err (lsMessage + "\n");
Err (lsMessage + "\n");
Therefore double quotes did not matter.
Only this worked:
lsMessage = "Dummy text";
Err (lsMessage + "\r\n");
Err (lsMessage + "\r\n");
I know \r\n also from e.g. Notepad++.
Copy link to clipboard
Copied
I use \r\n as well. I remember the order by the phrase "registered nurse" 🙂
Copy link to clipboard
Copied
Klaus and Ian,
Thanks for the info. Strange - the whole world is using \n but Frame decided to go with \r - a blast from the distant past, when the mechanical typewriter did not insert a newline but alo needed a carriage return. I bet most youngsters do not even know what a carriage return means - taking the rental car back to the airport, perhaps? 🙂
Ciao