Thanks for the extra information. Having some context does help.
From what I understand, there are 2 things that could be done:
- The script seems to work from a selected text frame, that actually identifies the story and possible text overflow. Creating a loop on all the stories of the active document should solve the issue of doing it manually.
- Since you applied an object style to the extra Text Frame, just making a loop that erases all the text frames using that particular Object Style, at the beginning of the script, should solve that aspect as well.
If your current script works fine, I recommend providing it as well as an ID file (with placeholder text for instance) that would serve as a guinea pig ^^ What's important for people to see here is the structure, not the content.
It would be more helpful for people, and see how to help in a more accurate way.
Hi Good morning!
I was able to get AI to do all the textframes in the story. But I still have one small issue, which i was hoping you could help me with (and as I said, i want to pay if necessary)
The text frame that the script inserts should be positioned just below the text frame (we'll call this frame1) that has the overflow. Its left border should align exactly with the left border of frame1, and its top border should be 1 point below the bottom border of frame1
I am including the updated script (you will need to change the script extension to ".js" ) as well as the demo doc.
Thank You!
SF
Edit/Update:
Eventually, I was successful in getting this done using the add-on "Mate" (it apparently is not bent on one AI engine but tries the best per the desired task), and it works fine.
The Mate add-on is definitely worth the 4$ a month price!!
I appreciate all the good will of everybody here!