Updating Script for InDesign

Hi all!!
I've never truly experimented with the scripting process for indesign but have seen some interesting posts on here that allow for multistates within multistates
Has anyone written one that would go through a folio and update each layout systematically - it's a bit of a ball ache updating one stack at a time and I can't script!!
If anyone knows where to start with writing one/or has written one
Could you please lend me your ever sought after expertise
Thanks SO much
Tim

Ah brilliant, I'll do that Bob, thanks for the suggestion!
I've just found a brilliant tutorial that's actually from adobe that I might try and make a bit of headway with - but I'll check with the guys that know what they're doing
Cheers!
Tim

Similar Messages

  • Is there an updatedcrossrefs script for InDesign CS6

    Running Mac Pro/2.66 GHz—Quad-Core Intel Xeon/Snow Leopard/
    OS/Mac OS X Version 10.6.2/2.66 GHz
    I converted a CS3 InDesign that uses the script "updatedcrossrefs.js", to CS6 InDesign. This file uses hyperlinks on the TOC and Index.
    I tried using the same script for CS3 InDesign in CS6 InDesign but it does not work.
    This is the error message "Could not catch page. Check destination names and existence."
    Is there an updated script for CS6?

    Sorry did not know I was using bold. My co-worker found this script however, she does not work here anymore. But here is the script. I know nothing about scripts except how to use them. Sorry.
    // Updatecrossrefs.js
    // Updates cross references made with hyperlinks
    // the hyperlink destination is where the reference refers to
    // the hyperlink sourcetext is the text that will be updated (like see xx)
    // If a book is open, the book will be handled,
    // if no book is open, the active document will be handled.
    // Made by Teus de Jong, last version April 10, 2006
    // Revisions by Dave Saunders January 22, 2006 and March 20, 2006
    // Thanks Dave!
    // Added unique naming mechanism for sources -- October, 2008
    if (app.books.length == 0){
              if (app.documents.length == 0){
                        errorExit('No documents are open');
              } else {
                        nrofdocs = 1;
                        doc = app.activeDocument;
    } else {
              nrofdocs = app.books[0].bookContents.length;
              for (i = nrofdocs - 1; i > -1; i--) {
                        if (app.books[0].bookContents[i].status != BookContentStatus.documentIsOpen)
                                  app.open(File(app.books[0].bookContents[i].fullName));
              doc = app.open(app.books[0].bookContents[0].fullName);
    for (d = 1; d <= nrofdocs; d++){
              for (i = 0; i < doc.hyperlinks.length; i++){
                        hyper = doc.hyperlinks[i];
                          // leave ID's own internal markers alone
                        if (hyper.name.substring(0, 1) == '.'){continue}
                          // leave hyperlinks to URLs alone
                          try {
                                  if (hyper.destination.constructor.name == 'HyperlinkURLDestination'){continue}
                        } catch (e) {
                                  hyper.showSource();
                                  errorExit('Selected hyperlink has undefined destination');
                        s = hyper.source.name;
                        // added October, 2008
                        // sometimes ID's unique name mechanism for sources fails; make sure the source has
                        // the same name as the hyperlink + '_src'
                        if (s != hyper.name + '_src')
                                  hyper.source.name = hyper.name + '_src';
                        if (hyper.destination.constructor.name == 'HyperlinkTextDestination'){
                                  s = getParentPageName(hyper.destination.destinationText);
                         } else {
                                   // try/catch added to allow for hyperlinks that have lost their destination -- Dave
                                   try {
                                              s = hyper.destination.destinationPage.name;
                                    } catch (e) { continue }
                        if (s != ''){
                                  // Check to see if update needed; saves a lot of time when processing large books -- Dave
                                  if (hyper.source.sourceText.contents != s) {
                                            hyper.source.sourceText.contents = s;
              if (d >= nrofdocs){
                        break;
              doc = app.open(app.books[0].bookContents[d].fullName);
    function getParentPageName(txt){
              try { 
                        var myFrame = getParentTextFrame(txt);
                        var pag = myFrame.parent;
                        while (pag.constructor.name != 'Page'){
                                  // in case the reference is in an inline, the parent of the frame is a character
                                  if (pag.constructor.name == 'Character'){
                                            pag = getParentTextFrame(pag);
                                  // in case the chain goes sour, back out
                                  if (pag.constructor.name == 'Application'){
                                            throw 'Error';
                                  pag = pag.parent;
                        return(pag.name);
              catch (e) {
                        alert('Could not catch page.\nCheck destination names and existence.');
                        return('');
    function getParentTextFrame(x){
              if(app.version == 3){
                        return(x.parentTextFrame);
              else {
                        return(x.parentTextFrames[0]);
    function errorExit(s){
              alert(s);
              exit();

  • How Can I write Script for Indesign set left indent

    I really need two scripts for indesign set left indent:
    1. If the left indent is: 8, 16, 24, 32, 40, 48, 56mm... set the first -8mm; if the left indent is 0, set the left indent 8mm, first -8mm.
    2. Whatever the first indent is, set the first 8mm.
    Can someone help me?

    Hi, Trevor
    I use change by list as below:
    grep {leftIndent:48mm} {leftIndent:56mm}
    grep {leftIndent:40mm} {leftIndent:48mm}
    grep {leftIndent:32mm} {leftIndent:40mm}
    grep {leftIndent:24mm} {leftIndent:32mm}
    grep {leftIndent:16mm} {leftIndent:24mm}
    grep {leftIndent:8mm} {leftIndent:16mm}
    grep {firstLineIndent:8mm, leftIndent:48mm} {firstLineIndent:8mm, leftIndent:56mm}
    grep {firstLineIndent:8mm, leftIndent:32mm} {firstLineIndent:8mm, leftIndent:48mm}
    grep {firstLineIndent:8mm, leftIndent:24mm} {firstLineIndent:8mm, leftIndent:32mm}
    grep {firstLineIndent:8mm, leftIndent:16mm} {firstLineIndent:8mm, leftIndent:24mm}
    grep {firstLineIndent:8mm, leftIndent:8mm} {firstLineIndent:8mm, leftIndent:16mm}
    grep {firstLineIndent:-8mm, leftIndent:48mm} {firstLineIndent:-8mm, leftIndent:56mm}
    grep {firstLineIndent:-8mm, leftIndent:32mm} {firstLineIndent:-8mm, leftIndent:48mm}
    grep {firstLineIndent:-8mm, leftIndent:24mm} {firstLineIndent:-8mm, leftIndent:32mm}
    grep {firstLineIndent:-8mm, leftIndent:16mm} {firstLineIndent:-8mm, leftIndent:24mm}
    grep {firstLineIndent:-8mm, leftIndent:8mm} {firstLineIndent:-8mm, leftIndent:16mm}
    but not that perfect,
    I want to useing jave "if{}" or "for{}" to write this script, but I don't kown the syntext.

  • Updates/patches for InDesign 4 CS2

    HELP.  I'm trying to find a download link for the updates for InDesign 4 for Windows from the CS2 package.  I know this is old but it is all we have...it is a reinstallation for our lab images.  I need it patched.  I've been able to find the Chinese Simplified, Chinese Traditional, Japanese, and Korean, and Roman.  I've been able to find the updates for Mac but not for Windows.

    http://www.adobe.com/support/downloads/detail.jsp?ftpID=3599
    Roman Languages includes English and most European scripts. It's the one you want.

  • Script for InDesign CS6 - create multiple, prenamed layers

    I created a script for Illustrator CS6, in ExtendScript Toolkit, that will create multiple, prenamed layers...see below...
    //Apply to myDoc the active document
    var layerName = LayerOrderType;
    var myDoc = app.activeDocument;
    //define first character and how many layers do you need
    var layerName
    var numberOfLayers=0;
    //Create the layers
    for(var i=0; i<=numberOfLayers; i++)
    { var layerName = ":: GRADIENT";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: STRIPES";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: LEGAL";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: BLK BAR";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: FLAME";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: LOGO/TYPE";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: TRIM,ETC";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = ":: LOEC INFO";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    // Moves the bottom layer to become the topmost layer
    if (documents.length > 0) {
    countOfLayers = activeDocument.layers.length;
    if (countOfLayers > 1) {
    bottomLayer = activeDocument.layers[countOfLayers-1];
    bottomLayer.zOrder(ZOrderMethod.BRINGTOFRONT);
    else {
    alert("The active document only has only 1 layer")
    I tried to use this exact code to replicate the same scenario in InDesign but it doesn't work.
    Can anybody help me out!?
    Thanks in advance

    Marijan Tompa's scripts are very nice and useful, however, for this simple task you can try create your own wiht this code:
    app.activeDocument.layers.add ({name: "GRADIENT", layerColor: UIColors.red});
    app.activeDocument.layers.add ({name: "STRIPES", layerColor: UIColors.lightBlue});
    app.activeDocument.layers.add ({name: "LEGAL", layerColor: UIColors.gray});
    //merge existing document layer to bottom layer (in this case original layer will be merged to 'GRADIENT')
    var myDocument = app.documents.item(0);
    var myLayerA = myDocument.layers.item(2);
              var myLayerB = myDocument.layers.item(3);
              myLayerA.merge(myLayerB);
    alert("Layers created!");
    assume, your document has one layer.
    Script creates three new layers, they appear in Scripts palette in this order:
    LEGAL
    STRIPES
    GRADIENT
    and merges 'old' layer to bottom layer of newly created set (GRADIENT).
    sure, you can add as much layers as you need, just don't forget modify LayerA and LayerB numbers accordingly.
    Or disable second part of the script at all, if you don't want anything to be merged.

  • Apple Script for indesign

    Hai all,
    i am trying to insert footnote and its contents for a particular xml element in "Adobe Indesign cs2" thru apple script. But i'm facing some problem. I'm able to select the xml element and its contents and i can insert footnote for that element and i can cut that contents but i couldn't paste this contents in footnote. I have tried with the following code:
    tell application "Adobe InDesign CS2"
    tell active document
    set theRoot to (item 1 of XML elements)
    end tell
    end tell
    myLoopLoop(theRoot)
    property myLoLoV : {}
    property myHoHoV : {}
    on myLoopLoop(myElement)
    tell application "Adobe InDesign CS2"
    tell active document
    set moreElement to every XML element of myElement
    repeat with x from 1 to (count of moreElement)
    set em1 to item x of moreElement
    select em1
    if (name of markup tag of em1 is "informalexample") then
    set em2 to em1
    select text of em2
    tell insertion point 1 of em1
    set myfootnote to make footnote
    end tell
    tell application "Adobe InDesign CS2"
    set myselection to selection
    cut (selection of active document)
    end tell
    tell application "Adobe InDesign CS2"
    tell insertion point 1 of myfootnote
    paste into myfootnote
    set text of em2 to myfootnote
    end tell
    end tell
    end if
    tell me to myLoopLoop(item x of moreElement)
    end repeat
    end tell
    end tell
    end myLoopLoop
    Can anyone help me out to sort this problem?
    Thanks
    anbu
    I Mac   Mac OS X (10.4.8)   Intel based Mac

    hi all
    any help
    thanks
    anbu

  • LifeCycle 8 Database update script for submit button

    I have a form that has numerous text fields for user inputs. I put a button on the form. This form is also populated with a SQL query when opened.
    When the user clicks the submit button, I need to capture the info entered in these fields, get one of the field value from the query when opened, and update a database record.
    How is that script done? Any sample scripts?
    Thanks in advance.

    I have a form that has numerous text fields for user inputs. I put a button on the form. This form is also populated with a SQL query when opened.
    When the user clicks the submit button, I need to capture the info entered in these fields, get one of the field value from the query when opened, and update a database record.
    How is that script done? Any sample scripts?
    Thanks in advance.

  • Updating plugins for inDesign CS5

    This has surely been discussed and answered prior to today but I can't find any mention other than a Search uncovering dozens of torrents.
    I frequently get a message I need to update my in-design plugins but can't find a link to an adobe download. Any help appreciated.

    I inherited the job of recovering files created during the period of time my company used Adobe CC and after analysis decided to go back to using CS5 and CS6 software they had purchased. I'm forming the opinion now that it will be easier for me to simply reconstruct the documents either in another program or ID CS5. There may be serious differences between CS5 and CC versions but for the publications this company produce, I can't find any useful difference between the two versions or at any rate, nothing I can't overcome with CS5.
    I'm not surprised to discover what you've said seems to be correct. Just another example of too much focus on profit and not enough on product perfection. When I compare some of my magazines created with an Atari system, the only functional difference is the colour and the layout. Both of which could be easily brought into line with current design trends. I agree absolutely with your description of the message. All it seems to have done is create a plethora of virus riddled torrents unknowing people are poisoning their computers with.
    Thanks for the reply. I think this company's answer is to recreate those documents that were not converted to .dml files before removing CC from their workstations.

  • Script for Indesign CS6 - Export Document to preset PDF

    Does anyone know how to do this please?

    Do what? You can't export a document to a preset. You can use a preset to export a document, is that what you mean?
    Check the ESTK object model under Document. Look at the exportFile() method.
    Dave

  • Indesign Contact Sheet script for Adobe Bridge 1.0.4.6

    Our company currently has all the Adobe CS2 products but as stand alone applications and not part of the Creative Suite. Therefore, we don't seem to have all the functionality of the suite.
    In particular the script to create Contact Sheets from Indesign CS2 of items through the script in Adobe Bridge.
    Can anyone tell me if there is a way to add the functionality of the contact sheet script for Indesign to Bridge without having the Adobe Creative Suite? And Why?
    We are looking for something to replace an extension used by Quark to create contact sheets from Badia software. I am loath to upgrade this extension unless absolutely necessary. We receave thousands of photo's a week and output contact sheets for our editors to pick and choose which photos they want/like.
    Thanks in advance.
    Scott

    [email protected] wrote:
    > Larry
    > for us to process thousands of photos this way would take hours.
    Why? Are you talking CPU hours or staff-hours? Does your workflow require heavy
    user interaction or is something else the problem?
    -X
    for photoshop scripting solutions of all sorts
    contact: [email protected]

  • Script exe for indesign cs2 is possible?

         i wrote a javascript for indesign cs2 application, user move that to script folder and run it.
    sometimes they edit the script for their own, it makes some problem.
    is it possible to make the script in exe format.
    by using Extend toolkit2 if i make it as binary format indesign cs3 accepts it, but the script not view in cs2 palette...
    how to solve it?
    thanks
    subha

    the scripts for Indesign can be exported as a binary format using the ExtendScript toolKit..
    This might prevent users from modifying them.
    However this jsxbin format can only be used in CS3 and CS4.
    Mayb u may consider upgrading to CS3 / CS4..
    hope this helps..

  • Scripting Adobe inDesign CS?

    Trying to sort out a couple of scripts to speed up my workflow in Adobe CS.
    I use a lot of great Photoshop droplets and a couple of Illustrator actions (very unpredictable) and would like to automate a few things in inDesign.
    Is there any way to record scripts for inDesign as is possible for Finder operations?
    Anyone know of a good resource online for this. Preferably prewritten, editable scripts.
    I would also like to ultimately set up hot folders that will run a series of processes when a file is added. i.e., Append file name, trigger a Photoshop action on file and then move to a print server.
    Folder actions from Automator/Script editor are promising but a bit unpredictable. For example if one moves a Folder that has a designated action to a new location it reapplies the folder action to all files contained as path to that file has changed.
    Any help appreciated, I don't have the time to trawl through pages of tutorials!

    You can access the InDesign Server COM object from Visual Basic in one of the following ways:
    * CreateObject This points to a running instance of InDesign Server if it can find one; otherwise, it instantiates an instance of InDesign Server and points to the new instance. Example:
    Dim idsApp As Object
    idsApp = CreateObject("InDesignServer.Application.CS3")
    * GetObject("name_of_configuration") This will attempt to point to the instance of InDesign Server that was started up with the corresponding "-configuration" param. If this instance does not
    exist, an exception is thrown with the error: Cannot create ActiveX component. Example:
    Dim idsApp As Object
    idsApp = GetObject("hi")
    * GetObject("configuration_portNum") This will try to point to the instance of InDesign Server that was started up with the corresponding -port param. If this instance does not exist, an exception is thrown with the error: Cannot create ActiveX component. Example:
    Dim idsApp As Object
    idsApp = GetObject("configuration_12345")
    NOTE:
    InDesign CS3 Server with MA updates applied is required in order to use GetObject() to target a specific instance of IDS. Also, you must run your VB application on the local system. IDS does not support targeting a specific instance of InDesign Server when running under IIS. Under IIS, you'll have to stick with the CreateObject() method.

  • Is there a script for renaming layers in ID CS5?

    Hello,
    I am new to scripting (I just started today) so far I have found some very useful existing scripts to help automate my workflow. I am wondering if anyone knows of the existence of a layer renaming script for InDesign.
    I have seen similar scripts for PS. I want to learn how to script but I am in need of this one for Monday...
    Thanks in advance!

    Antonio:
      Please remember that we're all volunteers here. If you can ask your question so we can understand it, we can probably help you. But if you cannot, it would take quite a lot of effort on our part to even determine what you asking.
    Jongware wrote in the other thread:
    This is quite a specialized case so it's unlikely there "is" a script. But there "could be" one. Ask in the scripting forum, as there are some people in there sharpening their skills with such requests. Make sure to detail what you need it to do: which layers? rename to what? Et cetera.
    You're not doing a good job on detail. How would the script know what to change your first, 3rd, 4th, and 5th "atoms" to?
    You have given us no information that I can see.

  • Hi is there a TextCleanup script for Indeisgn CC?

    I am looking for a TextCleanup Script for Indesign CC, any help would be greatly appreciated.

    There are tons of scripts to do this.
    For example,
    http://www.kahrel.plus.com/indesign/clean_space.htmlhttp://
    Remove spurious space | Peter Kahrel
    You may look in the web:

  • Any script for PowerMath Equation (InDesign CS4)

    Hi,
    All, I'm new to Indesign Scripting, and I'm hoping someone can help me.
    Is that possible any type of script (Apple/Java) for edit/update Poermath Eqation in Indesign CS4.
    In my Knowledge (not found) Powermath Editor have no Dictionary. Is that possible we make script for Powermath Editor.
    Thanks for answering.
    Regards
    snegig

    You can try it like this. (Tested on Mac OSX)
    // export indesign doc to idml
    // tested on Mac OSX
    // this code is Public Domain
    // check if the doc is saved
    var doc = app.activeDocument;
    if (!doc.saved) {
      doc.save();// if not save it
    // take the .indd's name and make a .idml from it
    var aName = doc.name;// get the name
    var newName = aName.replace("indd", "idml");// replace the indd to idml
    // crate a new FIle Object
    var theFile = File(File(doc.filePath).fsName + "/" + newName);
    // export
    doc.exportFile(ExportFormat.INDESIGN_MARKUP, theFile, false);
    // done

Maybe you are looking for

  • How to enforce index in oracle query

    Hi all how to enforce index in oracle query Regards

  • What type of camera to purchase

    I am looking for a camera to purchase for taking photos of my children playing and do sports. Like Karate, Cross Country, and Baseball.  Plus everyday activites

  • BLOB, MySQL and Creator table

    I am trying to get a table to display a set of blob images from a MYSQL database. When I dataProvider is dropped onto the table, the default Component type is Static text and for some reason does not recognise that thse field are of type blob/jpg. If

  • Computer maintenance and clean up

    Ive had my mbp since 8/07 and i have yet to run any cleanups or maintenance on my computer. this is my 1st mac and dont really know the basics of keeping os 10.4 clean and healthy. thanks in adavnce

  • Turn Windows Features on or off presents empty

    Hi, We are using Windows 7 32 bit enterprise edition and. Turn On and Off feature is empty. I have run System readiness tool and that did not fix the problem. Please help to solve the issue. Regards, Boopathi S