Skip to main content
Known Participant
September 20, 2009
Answered

[AS][CS3] counting paragraph lines

  • September 20, 2009
  • 1 reply
  • 2777 views

Hi!

Is there a way to count how many lines of text there are on a paragraph and then add some line breaks if there are not enough lines?

jukka

This topic has been closed for replies.
Correct answer sstanleyau

"count of lines" will give you the number of lines. To add extra lines, just set the contents of the chosen insertion points to newline.

--

Shane Stanley <sstanley@myriad-com.com.au>

AppleScript Pro, April 2010, Florida <http://www.applescriptpro.com>

1 reply

sstanleyauCorrect answer
Inspiring
September 20, 2009

"count of lines" will give you the number of lines. To add extra lines, just set the contents of the chosen insertion points to newline.

--

Shane Stanley <sstanley@myriad-com.com.au>

AppleScript Pro, April 2010, Florida <http://www.applescriptpro.com>

Known Participant
September 21, 2009

Thanks Shane!

It was right under my nose, i must be blind!

jukka

Inspiring
September 21, 2009

Thanks Larry but no help.

The insert point is still off after first occurence.

jukka


Work backwards, as Larry said, and try insertion point -2 (ie, before the existing return).