I have an InDesign with ~400 pages and need a rather simple script that adds a page to every existing page (so: p1+1; p2+1; p3+1 ...). Also, the added page should contain two text frames. I'm using InDesign CS6 and JS.
I have some lines, but not the whole thing:
// the start
var myDocument = app.activeDocument;
// the loop
for(var i = 0; i < myDocument.pages.length; i++) {}
// text frames
var rect = myDocument.pages.item(0).rectangles.add();
var rect2 = myDocument.pages.item(1).rectangles.add();
var gb = [125.891, 25, 230.458, 88];
var gb2 = [125.891, 94, 230.458, 157];
rect.geometricBounds = gb;
rect2.geometricBounds = gb2;