Greetings gurus and everyone better than I,
I am very new to Applescript and after trying to wrap my head around some of the more basic concepts feel it would be better in the long run to ask for much needed assistance from those who know rather than feel my brain ooze from my ear. I did a search through the site to see if perhaps there was anything close to what I am looking for, however it is somewhat specialized, so I didn’t find anything to match.
What I am looking for is a script that will do several things:
A) count the number of text lines/rows in layout “A” text box
B) take into account “higher” objects with run-arounds on them
C) in text file “B” read formatted text and identify paragraph breaks (classified listings)
D) copy groups of paragraphs (classified listings) from text file “B” back into layout “A” text box to fit in the open spaces, between the “higher” objects with run-arounds on them.
E) repeat process for the entire layout “A” document, using all the listings in text file “B”
I hope that was clear, but I’ll try to explain further here. I work for my local newspaper and we go through the process of copying and pasting classifieds into columns in the paper layout. Our boss is very particular in how the classifieds are entered, in that the must be complete listings between the regular display ads - he doesn’t want any listings to be split apart, as in half at the bottom of the page and the remaining half at the top in the next column over. We have tried to find a program/plugin out there to handle this but so far have come up empty. Since Applescript is pretty much built into every program (if I understand that correctly) then it should be doable for this purpose.
We are looking to have the script be able to identify how many rows of text can fit in the “visible” parts of the columns in the text box on the layout page, then toggle over to our formatted text file and copy paragraphs (out classifieds are separated by hard returns) to fill the open spaces without splitting them around placed objects to the front of the layout page text box or from the bottom of the text box to the top of the next column over. And then when that visible section in the column is filled, move on to the next section and continue the process.
Those are the basics of the script I would like to have help with. There are more advanced features I would love to get put in, but would be happy to start with a working script to accomplish the above. If there is anyone who can help me with this I would greatly appreciate it.
I thank you in advance for any help that can be offered.