RagTime and AppleScript
Good morning.
Sorry this has to be in English.
This is an AppleScript problem. We have a 10 page document that has a two columns with a text flow in each column.
Language A is on the left and Language B on the right.
We have an AppleScript which we use to switch the content of the containers as required. For example Language B on the left and Language A on the right.
We wish to redesign our document so the chapters (each language) are 'stacked'. We then have one column (text flow) on the page Language A and Language B is a new set of pages that follows with is own container.
I can do this with our existing AppleScript providing that the document is only one page long. It does not work when we have more than one page for each language unless the AppleScript is modified.
The script has to be told on what page (number) the container of second langauge starts. This is ok if the document is static and the number of pages always remains the same. However languages have different lengths. A text translated out of German into English has more text and the numer of pages is increased. It is then necessary to manually change the Applescript each time.
So, the question. Is it possible to make RagTime look for the relevant container and ignore the page numbers. The small bit of script below is how the the text is put in the relevant container. The aim is to replace the 'page 1' with a search for the start of the container irrelevant of which page it is on.
set contents of rectangle "deutscher Text" of page 1 of layout "•Layout zweisprachig" of document 1 to text flow "• deutsch" of document 1
Sorry, but I don't know how to show the script in colour in this window. Finally, I am preparing a sample document that I can send but it will not be ready until next week.
Thank you