Reply To: Script to duplicate page/spread after current

#14345481
J D
Participant

I’m getting a syntax error on this too.

Would anyone have a tip on how to edit this script below to affect the current page only?

Thanks!

// Define variables
var file = app.activeDocument;
var pages = file.pages;
var numberOfPages = pages.length;

// Duplicate each page
for (var i = 0; i < numberOfPages; i++) {
pages[i].duplicate();
}

// Intertwine pages
for (var j = 0; j < (numberOfPages – 1); j++) {
var currentPage = (numberOfPages + j);
var insertPoint = (j + j);

pages[currentPage].move(LocationOptions.AFTER, pages[insertPoint]);
}

This article was last modified on August 4, 2021

Comments (0)

Loading comments...