I am putting together a small script containing some code to check if a character is a forced line break.
This line wont work:
if(myCharToCheck2.contents != "\r")
Doing some digging, I found that a forced line break is an SpecialCharacter.FORCED_LINE_BREAK Enumerator, and therefore is referenced in a different way.
I cannot however work that into my simple line to check if myCharToCheck2 is NOT a forced line break.
Any ideas anyone?
use "\n" if you are looking for forced line break.
Thanks for the reply, however, I was using "\n" but that wasn't working, so I was trying"\r". I didn't put it back before posting the question.
Adding a forced line break is done using "\n" but reading a forced new line doesn't work in the same way.
Make a text frame with a soft new line (\n)
Run this script:
if(app.selection.parentStory.characters.contents == 1397124194)
Will return true for a forced new line as it is an enumeration.
I think I can work with that.