Highlighted

ExtendScript: adding a newline to console messages

Advocate ,
Jun 11, 2020

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

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

TOPICS
Scripting

Views

318

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

ExtendScript: adding a newline to console messages

Advocate ,
Jun 11, 2020

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

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

TOPICS
Scripting

Views

319

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 11, 2020 0
Enthusiast ,
Jun 11, 2020

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 11, 2020 0
Enthusiast ,
Jun 11, 2020

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 11, 2020 0
Advocate ,
Jun 11, 2020

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 11, 2020 2