Paragraph Text Question via scripting

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
info@mirzakadic.com
Posts: 2
Joined: November 24th, 2020, 2:35 am

Hi guys, I’ve been trying to solve a certain problem for two days without any success. Let’s say I have text variable

var text = “Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam rutrum sapien ultrices sapien condimentum, et congue risus placerat.”

And I want to apply it to boxText (paragraph text)

I get something like on attached picture nr.1. What I want is to have equal (around equal) number of words in each line. So, script should set boxTextSize to have equal number of words in each line. See picture nr. 2. I’ve tried braking the text with \r and everything else what would come first to your mind, but it just doesn’t work. The only possible solution in my head is set boxTextSize based on number of words or some magic like that :D. Just not experienced enough in scripting to get it on my own. Thank you very much in advance!

Image
Image

info@mirzakadic.com
Posts: 2
Joined: November 24th, 2020, 2:35 am

Any help would be greatly appreciated. This is a non-profit project where there would be thousands of these text boxes and I really want them to look decent without the need to correct all 6000ish of them. Thanks again! :)

Post Reply