Illustrator Script - TextFrame size and positioning
Greetings,
I'm trying to wrap my head around Illustrator Scripts. The company I work for has a series of documents that I'm designing that contain images and text. They all have the same template, which I've put together in Illustrator, but different content. I'm using Illustrator Dynamic Variables to import the text into the textFrames that I have put on screen, which works great, except that some text in Paragraph 1 falls shorter than the TextFrame it is in, while the text under it is longer and doesn't fit within it's Text Frame.
What I'm trying to do, is find a means to resize the top TextFrame to fit it's contents, and use it's position and height as a basis to move the second paragraph up the page and resize it's TextFrame to accomodate the text within it.
So far I've read a lot about the various properties of TextFrames and have learned that I can reposition the text frame using something like this:
Does anyone know if what I'm asking is possible, and does anyone happen to have a script that either does this or something similar that I could use as reference?