Does anyone have a script to duplicate multiple pages in CS4?

I know it can be done, but I'm not a programmer. What would be the script to duplicate a user defined number of pages after a user defined page in a mulit-page InDesign document? We have documents with up to 159 pages, but need to have pages within the documents duplicated right after a selected page, not to the end of the document.
This is all I have of a script for this and I don't know how to make it work or make it user-interactive for page number input:
--Duplicating more than one page at a time in InDesign CS4
tell application "Adobe InDesign CS4"
    set mySourcePageNumber to UserInput1
    set numberOfPages to UserInput2
    tell application "InDesign 6.0.3"
        tell active document
            repeat numberOfPages times
                set myNewPage to duplicate page mySourcePageNumber
            end repeat
        end tell
    end tell
end tell

This is a very basic script, just written for you on CS3 and totally untested:
if (app.documents.length == 0){
    alert ("Please open a document, select an object, and try again.");
    exit();
var myDoc = app.activeDocument;
var myPage = myDoc.layoutWindows[0].activePage;
var myPageId = myPage.id;
var myDialog = app.dialogs.add({name:"Duplicate pages"});
with(myDialog.dialogColumns.add()){
    with(borderPanels.add()){
        staticTexts.add({staticLabel:"Duplicate front-most page # " + myPage.name});
        var myIntBox = integerEditboxes.add({editValue:1, smallNudge:1, largeNudge:10});
        staticTexts.add({staticLabel:" times"});
var myResult = myDialog.show();
if(myResult == true){
    var myNumber = myIntBox.editValue;
    if (myNumber < 1) {
        alert(myNumber + " is invalid number.");
        exit();
    for (i = 0; i < myNumber; i++) {
        myPage.duplicate(LocationOptions.AFTER, myDoc.pages.itemByID(myPageId));
myDialog.destroy();
It duplicates the active (the front-most page) — its number you see in the bottom left corner of the document window. You can type a number or use up/down arrows to increment it by 1 (add shift key to increment it by 10).
Hope it helps.
Kasyan

Similar Messages

  • Does anyone have a list of all iWork Pages templates handy? I'm not at my Mac now.

    Does anyone have a list of all iWork Pages templates handy? I'm not at my Mac now.

    Sorry this forum is playing up again, refusing to take the image. Finally got it to bite.

  • Does anyone have a script that embeds and downsizes the images placed in a file?

    WEll?

    Wouldn't this vary significantly from person to person, company to company? For example, we have a ton of starter scripts from previous projects and have an automate prompt generator, so a net new script would only take a matter of days, unless it's something very different than we've seen before.
    Additionally, there are times that you want, newer people, to build something from scratch so they can have a better understanding of what they are doing and how UCCX scripting works. I guess I'm saying that what you're looking probably doesn't exist and if it does it will not apply to you very well.
    david

  • Does anyone have a script to place image on desktop into image opened in CC 2014?

    I'm trying to batch a group of images that need to refer to some crop guidelines that need to be placed on the top of each image. The crop keeps getting changed by the client, however, so I need to place these at the end of the project. Any help will surely be repaid at the Pearly Gates.

    That’s the first you mention of transferring multiple Layers – that is very likely gonna need a Script.
    If the layer is one object, then there won't be any differentiation of the crops.
    What does this mean exactly? Maybe you could explain the process in more detail.
    What is the exact Layer structure of the file from which you need to take the Layers and how are portrait and landscape images to be treated differently?
    Photoshop Scripting

  • Does anyone have a disc / installation file of Adobe CS4 and may make it available / sell?

    Does anyone have a disc / installation file of Adobe Photoshop CS4 and may make it available or sell? I bought a group license in 2009, I've got serial number and certificate but unfortunately I've lost the cd. Now I have to re-install the application. Adobe does not support this version any longer and does not provide download file or CD of CS4. Could you help me?

    You can download the software from this 3rd party website
    http://prodesigntools.com/download-adobe-cs4-and-cs3-free-trials-here.html
    FOLLOW THE INSTRUCTIONS CAREFULLY

  • Does anyone have a LISTENER heartbeat script

    Instead of reinventing the wheel, does anyone have a heartbeat script that runs on Unix (HP-UX 11.0) and checks the status of the Listener (e.g., if the Listener is down, reload/restart)?? Many thanks in advance....

    This is a very basic script, just written for you on CS3 and totally untested:
    if (app.documents.length == 0){
        alert ("Please open a document, select an object, and try again.");
        exit();
    var myDoc = app.activeDocument;
    var myPage = myDoc.layoutWindows[0].activePage;
    var myPageId = myPage.id;
    var myDialog = app.dialogs.add({name:"Duplicate pages"});
    with(myDialog.dialogColumns.add()){
        with(borderPanels.add()){
            staticTexts.add({staticLabel:"Duplicate front-most page # " + myPage.name});
            var myIntBox = integerEditboxes.add({editValue:1, smallNudge:1, largeNudge:10});
            staticTexts.add({staticLabel:" times"});
    var myResult = myDialog.show();
    if(myResult == true){
        var myNumber = myIntBox.editValue;
        if (myNumber < 1) {
            alert(myNumber + " is invalid number.");
            exit();
        for (i = 0; i < myNumber; i++) {
            myPage.duplicate(LocationOptions.AFTER, myDoc.pages.itemByID(myPageId));
    myDialog.destroy();
    It duplicates the active (the front-most page) — its number you see in the bottom left corner of the document window. You can type a number or use up/down arrows to increment it by 1 (add shift key to increment it by 10).
    Hope it helps.
    Kasyan

  • Does anyone have experience with having multiple editors work on the same project from different computers?

    Does anyone have experience with having multiple editors work on the same project from different computers?

    As much as I hate to admit it, YOU ARE RIGHT!
    I will tread lightly on this project.
    Thanks for the sanity check,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Every time I sync my iPhone with iPhoto I end up getting duplicate photos on my iPhone. The other problem is that I can not delete the dups on my iPhone.   Does anyone have an answer to this problem?

    Every time I sync my iPhone with iPhoto I end up getting duplicate photos on my iPhone. The other problem is that I can not delete the dups on my iPhone.   Does anyone have an answer to this problem?

    Mike whether I create a folder within the Pictures Folder that iTunes uses to sync photographs or just copy them into the main folder the result is the same, I end up with Photo Library plus another album containing an identical set of pictures as contained in Photo Library.
    The User Manual for iOS5 states ...
    You can create, rename, and delete albums on iPhone to help you organize your photos and videos.
    Create a album: When viewing albums, tap Edit, then tap Add. Select photos to add to the new album, then tap Done. Note: Albums created on iPhone aren’t synced back to your computer.
    Rename an album Tap Edit, then select an album.
    Rearrange albums Tap Edit, then drag up or down.
    Delete an album Tap Edit, then tap the delete sign.
    Yes I can Add a new Album, but cannot delete an album already created. The delete sign does not appear.
    In iTunes the only folder that I can see listed is the man one into which iTunes stores pictures, which I have named iPhone Photos.
    When I look on my PC this iPhone Photos folder contains another folder named iPod Photo Cache and a multitude of folders created by iTunes, the named F00, F01,F02 etc etc. and a Photo Database file.
    Now whether I create a seperate folder within iPhone Photos to store my favourite photos in, or just copy them all into the iPhone Photos folder without being encased within another folder, or create a folder inside the iPod Photo Cache folder the result is the same ...
    I end up with Photo Library plus another album containing an identical set of pictures as contained in Photo Library.
    I am going around in ever decreasing circles here and getting nowhere fast!! 

  • Does anyone know how to remove duplicate songs in my music

    i have songs that i want to delete.  half of the songs are my kids songs and i dont like them.  does anyone have any ideas.

    I just looked at my duplicate downloads again.  All are listed as iTunes, Version 11.2.2, Installed May 30, 2014 (4 copies of what looks like the exact same download) and then May 29, 2 copies, again looks like exact same thing because the only difference is the date - not the number of the download, or the description. So this is how I have 6 downloads, when I probably only need one of these.  Wish someone would shed some light on this so that I can clean it up.  But thanks for at least being responsive and saying you have the same question! 

  • Having trouble opening a pdf with Adobe...keep seeing an error sign "acroExch"  does anyone have a way to fix this?

    Having trouble opening a pdf with Adobe...keep seeing an error sign "acroExch"  does anyone have a way to fix this?

    Hmm, "Use Adobe Reader" should launch the PDF outside of Firefox in the stand-alone Adobe Reader application, so seeing it in a tab is something of a puzzle.
    Could you check your version of Adobe Reader? For Windows 7, you normally would have the Reader XI series (Reader 11), which has had several updates. From inside Adobe Reader, you can use Help > Check for Updates to make sure it's current.
    In Firefox, could you check your Adobe Acrobat plugin version or possibly versions? You can view that on the Add-ons page. Either:
    * Ctrl+Shift+a
    * "3-bar" menu button (or Tools menu) > Add-ons
    In the left column, click Plugins. If you find multiple versions, this can cause problems and may need to be cleaned up manually (post back on that for suggestions).
    Sometimes, the settings file which stores those download handler preferences becomes corrupted and there's not much else to do than to rename or remove that file and let Firefox rebuild it.
    To do that, open your current Firefox settings (AKA Firefox profile) folder using either
    * "3-bar" menu button > "?" button > Troubleshooting Information
    * (menu bar) Help > Troubleshooting Information
    * type or paste about:support in the address bar and press Enter
    In the first table on the page, click the "Show Folder" button. This will launch a new window (Windows Explorer window) listing various settings files.
    Leaving that window open, switch back to Firefox and Exit, either:
    * "3-bar" menu button > "power" button
    * (menu bar) File > Exit
    Pause while Firefox finishes its cleanup, then rename '''mimeTypes.rdf''' to something like mimeTypes.old
    Start Firefox back up again and "PDF Files" should be back to their default setting of "Preview in Firefox". Try changing that to "Use Adobe Acrobat (in Firefox)" and test to see whether there's any improvement.

  • Does anyone have problems with iTunes movie rentals freezing in the middle of the movie?

    Does anyone have problems with iTunes movie rentals freezing in the middle of the movie, requiring a force quit, which causes your rental to disappear? This has happened multiple times to me recently. Last time Apple didn't refund my money after reporting the problem. I have been using iTunes for many years but am about to give up.

    Correction: I was refunded for the previous movie freeze.

  • Does anyone have trouble with the iPad booting you off of the internet?  I will be in the middle of something (i.e. Facebook), and it boots me out and I have to sign in again.

    Does anyone have trouble with the iPad booting you off of the internet?  I will be in the middle of something (i.e. Facebook), and it boots me out and I have to sign in again.

    Jon....
    Don't confuse the threads here with 'typical' experience.  Most of the stuff here is from brand new users, and those that have problems, and considering the 30 million pads in use, represent a very small sliver.
    If you are having repeated crashes it is really pretty basic.  You either have a physical problem with your pad, or you are using too much memory.
    The iOS system is supposed to monitor memory, and shut down previously used apps automatically to free up memory for what you are doing now.  That part of ios is not perfect, and if an app introduces an unexpected memory load, sometimes it gets over whelmed.  
    This happens, more often than not, when using safari with multiple windows open on graphic intense sites.  It can also happen with a memory intensive game, and residual apps in the background.
    Double  tap the home key and take a peek at the recently used list, and shut them down completely, and often the problem goes away.
    If the problem persists, you may have a software issue, and a trip to the genius bar may be in order.

  • Does anyone have trouble serializing the enterprise version-education?

    Does anyone have trouble serializing the enterprise version (education) by any chance? We can't seem to serialize using the serializing tool. the CC 2014 reverts to a trial...

    Jon....
    Don't confuse the threads here with 'typical' experience.  Most of the stuff here is from brand new users, and those that have problems, and considering the 30 million pads in use, represent a very small sliver.
    If you are having repeated crashes it is really pretty basic.  You either have a physical problem with your pad, or you are using too much memory.
    The iOS system is supposed to monitor memory, and shut down previously used apps automatically to free up memory for what you are doing now.  That part of ios is not perfect, and if an app introduces an unexpected memory load, sometimes it gets over whelmed.  
    This happens, more often than not, when using safari with multiple windows open on graphic intense sites.  It can also happen with a memory intensive game, and residual apps in the background.
    Double  tap the home key and take a peek at the recently used list, and shut them down completely, and often the problem goes away.
    If the problem persists, you may have a software issue, and a trip to the genius bar may be in order.

  • Does anyone know how to delete duplicate photographs will it affect photostream

    Does anyone know how to delete duplicate photographs I seem to have so many, is this anything to do with photostream as I have an ipad as well. I have over 7000 photos and find it impossible to find them all. When I first got Apple 9 years ago there was a drop down menu that found all duplicates which you could then delete but that was taken off at some point. I would be really gratful for some help i am not savvy with the technical side of computing.

    For dealing with duplicates in iPhoto check out Duplicate Annihilator or Decloner or iPhoto Duplicate Cleaner or  iPhoto Library Manager

  • Does anyone have a sample implementation plan that can be shared?  High level?

    Does anyone have a sample implementation plan that can be shared?  High level?

    You will probably need to inquire with a VMware consultant to get this kind of information.  VMware depends on these people to make sure they keep the reputation of the software at a very high level.  
    They will have access to various free tools to help large and small scale deployments.  Tools like VMware Health Check Script and the ESX deployment tool.
    If you find this information useful, please award points for
    "correct"
    or "helpful".
    Wes Hinshaw
    www.myvmland.com

Maybe you are looking for

  • New iPod Touch - oleophobic coating?

    Went by the Apple store today but new iPods weren't in yet. I was wondering if the new ones would have the oleophobic coating -- anyone know? Since the iPhone 3Gs specs mention it by name and the iPod Touch specs do not, one can only assume the Touch

  • Missing Adobe Reader Plug-In for Chrome

    Chrome Version: 26.0.1410 Operating System: Mac OSX 10.6.8 Extensions: None When trying to open a PDF inside of Chrome, I receive an error to disable the Chrome default PDF view and use Adobe Reader instead. Using this website: http://support.google.

  • Does it always take hours to download a movie through the apple tv when you rent from I tunes

    Does it always take hours to download a movie through apple tv when renting a movies through itunes?

  • Parsing Huge Fixed length files

    Hi All, I have a requirement to parse a fixed lenght file which is of size 100MB. I have 1.7 million records in that file where each and every record is of length 41. When I am trying to load the file using the LineNumberReader and using the substrin

  • Lookups on cube

    Hi BI experts, 1) Is it possible to write lookups on cubes. 2) is that a usual practice. 3) is there any sample abap code to do that ? Regards, BWer