This content has been marked as final.
Show 3 replies
-
1. Re: [JS] CS5 Checking for FORCED_LINE_BREAK
Jump_Over Mar 20, 2013 4:41 AM (in response to Roy Marshall)Hi,
use "\n" if you are looking for forced line break.
rgds
Jarek
-
2. Re: [JS] CS5 Checking for FORCED_LINE_BREAK
Roy Marshall Mar 20, 2013 11:04 AM (in response to Jump_Over)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.
Try this:
Make a text frame with a soft new line (\n)
Run this script:
alert(app.selection[0].parentStory.characters[0].contents);
Weird...
-
3. Re: [JS] CS5 Checking for FORCED_LINE_BREAK
Roy Marshall Mar 20, 2013 11:32 AM (in response to Roy Marshall)OK.
if(app.selection[0].parentStory.characters[0].contents == 1397124194)
Will return true for a forced new line as it is an enumeration.
I think I can work with that.


