I am trying to learn how to write in javascript, but it seems it is tediously slow for me. I don't have dedicated time, and the script I need is simple, repetitive and perfect for scripting. (Recording actions would be a great help, Adobe.) I am looking to see if anyone is interested in writing this script, or at least getting me started.
I have a layout of 6 elements (an optional graphic, and two text boxes) in a 2 column setup. I need to copy these elements onto a new page, then swap the elements left-to-right, essentially taking the left column and putting it on the right and vice versa. This is so that the second page can print on the back side of the first page and the elements print back-to-back. A simple diagram:
page 1 before script:
A B
C D
E F
After script, pages 1 & 2:
A B B A
C D D C
E F F E
I do this by hand, but I do several thousand of these every year and it is time consuming. Automating it would be a boon to me.
The elements might change in what they contain (one or a few text boxes, none or one graphic). They are not grouped together, but could be. The size of the element is always 4″x3″ and always swapped in the same configuration as above. The starting configuration is the result of a data merge, so the number of pages will vary. The final result is that the even pages are duplicates of the odd pages (with the appropriate swapping of columns), and so there will always be an even number of pages in the final doc.
The pseudo-code I see is:
While not eof {
for each existing page {
create new page after the existing one
copy elements to the new page
swap columns of elements
} end for
} end while
Any takers? Any help?
Thanks,
Jake