Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Script to duplicate page/spread after current #14346619
    J D
    Participant

    Hi all.

    Old thread, but still trying to sort this out.

    I’ve tried these two scripts, but they seem to also copy objects on the pasteboard of the pages below and above, resulting in the pasteboard expanding with unwanted objects.

    Any suggestions for a way to edit these to create a script that:
    • Duplicates the active page and/or spread
    • Moves that page/spread to sit next in order
    • Doesn’t affect pasteboard objects that it shouldn’t

    app.activeWindow.activePage = app.layoutWindows[0].activePage.duplicate (LocationOptions.AFTER, app.layoutWindows[0].activePage);

    or

    app.activeWindow.activePage = app.activeWindow.activePage.duplicate (LocationOptions.AFTER, app.activeWindow.activePage);

    in reply to: Script to duplicate page/spread after current #14345506
    J D
    Participant

    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]);
    }

    in 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]);
    }

Viewing 3 posts - 1 through 3 (of 3 total)