In a program I'm working on, I need to know total line of the text and align the object below based on the total lines of the previous text block.
The only way I can think of is to have a list with measured the width in pixels of all the letters. then read the word and characters of text. Add to the total width of the text. if it reaches the defined width. that word moves to the next line and add 1 to the total line and start the total width from the total width of the word that is wrapped to the next line.
I wonder if there is a simpler way to know the last words of each line in a wrapped text line/
Thanks for your help,
If you just need to know where the bottom of your (wrapped) text is you can use the charPosToLoc() function:
mText = member("text") put mText.charPosToLoc(mText.char.count) -- (some #point object)
Or you could set member("text").boxType = #adjust and grab member.height