InDesign Autoflow/Page Script

First off, I'm fairly new to scripting and InDesign all together. I am trying to edit a CS2 VBScript that extracts the page number/part number from tables on multiple pages. The tables can span from 1 to 20 pages. The problem I'm running into is the larger tables that autoflow and span the multiple pages show the original/starting page number for all the parts.
So my question is there a way to have Autoflow check for Page Breaks in the Tables? Hopefully I'm making sense. Any help is greatly appreciated!
Thanks!

myTF = myCell.Texts.Item(1).ParentTextFrames.item(1)
myPage = myTF.Parent
myPageName = myPage.Name
robin
www.adobescripts.com

Similar Messages

  • Place multiple InDesign document pages (ImportedPages)

    Hello,
    I need a way to place multiple pages from an InDesign document in much the same way as the sample PlaceMulitpagePDF.jsx does but with InDesign documents rather than PDFs.
    The following is the critical line where the PDF page number to import is set:
    app.pdfPlacePreferences.pageNumber = myCounter;
    What is the equivalent command for setting the InDesign document page number when choosing a page to import?
    I have tried using:
    Application.ImportedPageAttribute.pageNumber
    but without result.
    TIA

    Why, thank you Mr. Schneider!
    I am embarassed to say that my problem was a couple of typos, (reading the Zanelli script made that obvious to me). The command should have been:
    app.importedPageAttributes.pageNumber
    Note the lowercase "i" on "imported" and the "s" after "Attribute."
    Your help is very much appreciated!

  • How create indesign using Java Script

    I am new in indesign and want to create indesign application using JavaScript.
    When i use AppleScript to create Indesign Application i use this statement
    tell application "Adobe InDesign CS5.5"
    set myDocument to make document with properties
    end tell
    Indesign Application create sucessfully.
    How create Indesign Application using JavaScript ?
    or what is equivelent statement of ( tell application "Adobe InDesign CS5.5" ) in Java Script.
    There are some java scripting example given on forum or in sdk.These all example start with app.
    when I debug these java script using ExtendScript ToolKit 3.6 It give error on app (undefined app).I think this app ia application object.
    How create  indesign application object  app in javascript ?
    While this script run sucessfully when i put these script in C:\Program Files\Adobe\Adobe InDesign CS5.5\Scripts
    and to run these script use Scripts panel (choose Window > Utilities > Scripts), then double-click the script name in the Scripts panel in indesign application.But In this case first i start indesign application and then choose Window > Utilities > Scripts then double-click the script name in the Scripts panel.
    I want to create Indesign Application (instance) using JavaScript.When I run or (debug) my JavaScript in any javaScript tool like ExtendScript ToolKit 3.6 then Indesign application should start, like in Apple Script.
    Thanks

    Thanks Vamitul for reply
    For example when i run SelectObjects.jsx An InDesign CS5.5 JavaScript in ESTK  then message prompt "Target Adove Indesign CS5.5 is not running. Do you want to lanch." Then on click yes Indesign application start.
    I want to Know how indesign object "app" is created to start Indesign application on click yes.
    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/indesign/cs55-docs/In DesignScripting/InDesign-ScriptingTutorial.pdf
    Like in VB to create indesign object we use CreateObject("InDesign.Application"). In javascript how create object say "app" of InDesign Application.
    For example if  i write
    var myDocument = app.documents.add();
    var myTextFrame = myDocument.pages.item(0).textFrames.add();
    myTextFrame.geometricBounds = ["6p", "6p", "24p", "24p"];
    myTextFrame.contents = "Hello World!";
    in a simple text file and save it with .js extention and to open this double click on this  it give error undefined "app".
    Source :Microsoft JScript runtime error
    So how define "app" or create indesign object ?
    Thanks

  • How to disable the option of "Overprint [Black] Swatch at 100%" in Indesign by Apple Scripting

    Hi Friends,
    I am new to Indesign Scripting by Apple Script. As a beginner, I am trying to do some basic scripting in Indesign by Apple Script.
    My aim is to disable the option of "Overprint [Black] Swatch at 100%" in Indesign. This option is available when we go to Indesign ---> Preferences----> Appearance of Black.
    Also, if a user opens a file, in which the swatch is already enabled, then it should prompt him for disabling.
    I can make a display dialog in AppleScript. But, I am bit unsure as how can I go ahead and disable this option. I tried this below script:
    tell application "Adobe InDesign CS4"
          tell every layout window to set overprint preview to false
    end tell
    However, it is changing the view option to overprint preview.
    Appreciate your help and suggestions!
    Thanks,
    Abhishek

    tell application "Adobe InDesign CS5"
              tell the active document
                        set overprint black of document preferences to false
              end tell
    end tell

  • Find raster Image & Vector image in adobe indesign using apple script?

    Find raster Image & Vector image in adobe indesign using apple script?

    Find raster Image & Vector image in adobe indesign using apple script?

  • Hello, I am trying to place a file typed in Japanese in to an Indesign CS2 page.

    Hello, I am trying to place a file typed in Japanese in to an Indesign CS2 page.  The original text is a Microsoft Word file.
    When it is saved as a .pdf, I am not able to do anything with it. I use a MAC running on Tiger 10.4.11.
    I need it for an insert in a CD.
    Any help on this?
    thank you very much.
    S

    Ah -- you are placing the PDF, right? Use the Word file instead. A PDF file is not a text file, so you get it as an image.

  • How to digitize a physical book (scanned pfd file) to a kindle format with Indesign? pages are 8x11.

    How to digitize a physical book (scanned pfd file) to a kindle format with Indesign? pages are 8x11.
    I have all scanned pages, but the kindle format offered on the Indesign options is bigger. What should I do? Do I start a book from scratch with the scanned pictures or do I leave the pages with the white space on them with the kindle option of Indesign.

    Hi barbaraegarza,
    For your situation, you could try using alternatives like PDF4Kindle, Calibre, or Papercrop.  But based on what I've read and my quick experiment, depending on the complexity of  your PDF, it may be more effort than it's worth to try to convert a PDF into a legible Kindle, ePub, or any other e-reader file.
    I did a quick test on Calibre with a 16-page PDF that contained multiple columns and images.  The results were illegible!  It ran the lines from each column together, making the text difficult to comprehend.  Calibre explains why PDFs are difficult to convert -- Ebook Conversion — calibre User Manual.  I have not tried the other two applications that I suggested above, but I would assume that the results would be very similar.
    I don't know what kind of results you got when you converted it in InDesign, but if your first test turned out fine and it was just the size of the file that you are concerned about, you could use Acrobat to reduce your PDF's file size and convert it to the Kindle format in InDesign again.
    Hope this helps.  Good luck!

  • Indesign master page putting the images on the master in teh middle of some of my pages but not all

    indesign master page putting the images on the master in teh middle of some of my pages but not all =[

    We'll need some more information, and probably a few screen shots, like the master page and one of your pages where the image is not showing.

  • Indesign Image Catalog Script

    Hi,
    I need to change the current Indesign (CS3)ImageCatalog script (.jsx) to look a all files and folders on a CD not just a single folder. Does anyone know how I can do this?
    Thanks!

    The way it's supposed to be used is by changing the way you wiev files in Bridge. Disable folders, and you will see all files.
    So in Bridge choose the CD*/Folder that contains the images/folders with images you wish to use, in the Filter Panel, click on the Folder symbol, this will show all files in all folders below the containing folder.
    Selecting no files, and just running the Indesign Contact Sheet script will then use all the files.
    *(Actually you should properbly copy the files to your desktop)
    That should do the trick.

  • Exporting Secured PDF from indesign using apple script

    hi there, this is my first go at scripting,
    basically what i am trying to do is:
    tell indesign to turn on a layer called "proof" in the active document
    then export pdf - set pdf preference to smallest file size, all pages, and secure the file WITH A PASSWORD so that it can be opened but not edited (unless by someone at my agency who knows this password). this easy enough to manually, but im sick of typing out a password everytime i save a proof.
    then save to a specific folder on the desktop, using the already existing filename - so 'myfile.pdf'
    the code below gives me this message "
    error "Can’t make name of PDF export preferences into type Unicode text." number -1700 from name of «class DFpf» to Unicode text
    could someone please help me word this properly? I tried first referring to a pdf preset instead of setting all the values ie set color bitmap etc but i couldnt get the password to work,
    here is what i have so far, written from snippets that other people have tried:
    tell application "Adobe InDesign CS4"
              tell active document
      try
                                  set visible of layer "PROOF" to false
                        end try
      set docName to name
                        set baseName to text item 1 of docName
                        set ASTID to AppleScript's text item delimiters
                        set AppleScript's text item delimiters to "."
                        set AppleScript's text item delimiters to ASTID
              tell PDF export preferences
                        set acrobat compatibility to acrobat 4 --> create a 1.3 pdf
                        set use security to true
                        set disallow changing to true
                        set disallow copying to true
                        set disallow document assembly to true
                        set disallow extraction for accessibility to true
                        set disallow form fill in to true
                        set disallow notes to true
                        set disallow hi res printing to false
                        set color bitmap sampling DPI to 100
                        set grayscale bitmap sampling DPI to 100
                        set monochrome bitmap sampling DPI to 100
      --set image quality
                        set color bitmap quality to minimum
                        set grayscale bitmap quality to minimum
      --set fonts
                        set subset fonts below to 0
      --set security
                        set use security to true
                        set change security password to "editedit"
                        set disallow extraction for accessibility to false
                        set disallow copying to true
                        export format PDF type to "/Users/kimwilson242/Desktop/_PROOFS/" & name & ".pdf" without showing options
              end tell
    end tell

    tell application "Adobe InDesign CS5"
      -- prefs belong to app so use in tell app block
              tell PDF export preferences
                        set acrobat compatibility to acrobat 4 --> create a 1.3 pdf
                        set use security to true
                        set disallow changing to true
                        set disallow copying to true
                        set disallow document assembly to true
                        set disallow extraction for accessibility to true
                        set disallow form fill in to true
                        set disallow notes to true
                        set disallow hi res printing to false
                        set color bitmap sampling DPI to 100
                        set grayscale bitmap sampling DPI to 100
                        set monochrome bitmap sampling DPI to 100
      --set image quality
                        set color bitmap quality to minimum
                        set grayscale bitmap quality to minimum
      --set fonts
                        set subset fonts below to 0
      --set security
                        set use security to true
                        set change security password to "editedit"
                        set disallow extraction for accessibility to false
                        set disallow copying to true
              end tell
      -- now deal with the doc
              tell active document
                        try
                                  set visible of layer "PROOF" to false
                        end try
                        set docName to name
                        set baseName to text item 1 of docName
                        set ASTID to AppleScript's text item delimiters
                        set AppleScript's text item delimiters to "."
                        set AppleScript's text item delimiters to ASTID
      -- use flexible path to user desktop… path strings are HFS (colon delimited)
                        export format PDF type to (path to desktop as text) & "PROOFS:" & name & ".pdf" without showing options
              end tell
    end tell

  • How to InDesign CS5 - .jsx script export multiple PDF??

    ok I have a datamerge process with .jsx script that is exporting to single page pdf files. What I need it for 2 of these pages to be in one (multi-page pdf). how can I accomplish this?
    here is the script I have here is my function & teardown:
    function mySnippet(){
              //<fragment>
              var myPageName, myFilePath, myFile;
              var myDocument = app.documents.item(0);
              var myBaseName = myDocument.name;
              for(var myCounter = 0; myCounter < myDocument.pages.length; myCounter++){
                        myPageName = myDocument.pages.item(myCounter).name;
                                app.pdfExportPreferences.pageRange = myPageName;
                        //app.pdfExportPreferences.pageRange = myPageName, "15-16";
                switch(myPageName) {
                        case "1" : myPageName = "Human Card Approval";
                                  docType = ""  break;
                        case "2" : myPageName = "Pet Card Approval";
                                  docType = "" break;
                        case "3" : myPageName = "Rx FAQ EN";
                                  docType = "FAQ" break;
                        case "4" : myPageName = "Rx FAQ ES";
                                  docType = "FAQ" break;
                        case "5" : myPageName = "Labs & Imaging FAQ EN";
                                  docType = "FAQ" break;
                        case "6" : myPageName = "Labs & Imaging FAQ ES";
                                  docType = "FAQ" break;
                        case "7" : myPageName = "Equalizer No Cards EN";
                                  docType = "Equalizer" break;
                        case "8" : myPageName = "Equalizer w_cards EN";
                                  docType = "Equalizer" break;
                        case "9" : myPageName = "Equalizer Slick Stand EN";
                                  docType = "Equalizer" break;
                        case "10" : myPageName = "Equalizer No Cards ES";
                                  docType = "Equalizer" break;
                        case "11" : myPageName = "Equalizer w_cards ES";
                                  docType = "Equalizer" break;
             case "12" : myPageName = "Equalizer Slick Stand ES";
                                  docType = "Equalizer" break;
                        case "13" : myPageName = "Medicare Donut Hole EN";
                                  docType = "Donut Hole" break;
             case "14" : myPageName = "Medicare Donut Hole ES";
                                  docType = "Donut Hole" break;
             case "15" : myPageName = "Trifold EN Outside";
                                  docType = "TriFold" break;
                        case "16" : myPageName = "Trifold EN Inside";
                                  docType = "TriFold" break;
                        case "17" : myPageName = "Pet w Cards EN";
                                  docType = "Pet" break;
             case "18" : myPageName = "Pet Slick Stand EN ";
                                  docType = "Pet" break;
                        case "19" : myPageName = "Pet w Cards ES";
                                  docType = "Pet" break;
             case "20" : myPageName = "Pet Slick Stand ES";
                                  docType = "Pet" break;
                        fileName = group + " " + myPageName + " " + date + ".pdf";
                        myFilePath = dirPath + docType + "/" + fileName;
                        myFile = new File(myFilePath);
                        myDocument.exportFile(ExportFormat.pdfType, myFile, false);
              //</fragment>
    //</snippet>
    //<teardown>
    function myTeardown(){
    Here is what I need exported as one pdf file:
             case "15" : myPageName = "Trifold EN Outside";
                                  docType = "TriFold" break;
                        case "16" : myPageName = "Trifold EN Inside";
                                  docType = "TriFold" break;

    That would require scripting. You might inquire in the InDesign Scripting forum for scripts that might work.

  • INdesign Cs4 java script

    hello all scripters:
    can any body help me to develope a script in javascript/apple script
    i want search a paragraph style and a character style in indesign page with page num
    i tried by this.. script.. any body give me this script in apple m not good in java script,,,,
    var myDc =app.activeDocument;
    var mySty = myDc.characterStyles.everyItem().name;
    var myDia = app.dialogs.add({name:"Character Style Display Menu", canCancel:true});
         with(myDia.dialogColumns.add()){    
              with(borderPanels.add()){
                   with(dialogColumns.add()){staticTexts.add({staticLabel:"Select Character Style:  "});}
                        with(dialogColumns.add())
                            var SelSty = dropdowns.add({stringList:mySty, selectedIndex:0});}
    var myRes = myDia.show();
    if(myRes==true)
          var myChoice = mySty[SelSty.selectedIndex];
          myDia.destroy();   
    else
    { exit();}
    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    app.findTextPreferences.appliedCharacterStyle = myChoice.toString();
    var myFind = app.findText(false).reverse();
    for(var a=myFind.length-1; a>=0; a--){
         var  myString= myFind[a];
         var myPg = myString.parentTextFrames[0].parent.name;}
    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    if(myCon==null)
                    {alert("not found");}

    Hi Vijay,
    Please use the below JS code is as per your request.
    var myDoc =app.activeDocument;
    var myLW = 100;
    var myStyleNames = myDoc.characterStyles.everyItem().name;
    var myDialog = app.dialogs.add({name:"Character Style KT Page Numbers Create", canCancel:true});
         with(myDialog.dialogColumns.add()){    
              with(borderPanels.add()){
                   with(dialogColumns.add()){staticTexts.add({staticLabel:"Choose the KT Character Style:   ", minWidth:myLW});}
                        with(dialogColumns.add()){var myChooseStyle = dropdowns.add({stringList:myStyleNames, selectedIndex:0});}
    var myResult = myDialog.show();
    if(myResult == true){
         var mySelStyle = myStyleNames[myChooseStyle.selectedIndex];
         myDialog.destroy();
    else{
         myDialog.destroy();
    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    app.findTextPreferences.appliedCharacterStyle = mySelStyle.toString();
    var mySearch = app.findText(false);
    for(var a=mySearch.length-1; a>=0; a--){
         var  myText= mySearch[a];
         var myPagenum = myText.parentTextFrames[0].parent.name;
         var myContents = myText.contents;
         app.selection[0].insertionPoints[-1].contents = String(myContents+"\t"+myPagenum);
         app.selection[0].insertionPoints[-1].contents = "\r";
    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    thx
    csm_phil

  • InDesign CS4 Server Scripting duplicate()

    Hi,
    Just wondering anyone would be able to help me with this.
    I am having problem with using duplicate() in a InDesign CS4 Server Javascript. It locks the InDesign instance while running the script and we have to unlock it by restarting the Server. Below is the offended script. Do anyone have any idea what is causing this? My head hurts...
    var inlines = myDocument.stories.everyItem().pageItems.everyItem().getElements();
    myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.millimeters;
    myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.millimeters;
    myDocument.viewPreferences.rulerOrigin = RulerOrigin.pageOrigin;
    var myPage = myDocument.pages.item(0);
    var myX = myPage.marginPreferences.left;
    var myY = myPage.marginPreferences.top;
              if(inlines.length==1){
                     inlines[0].duplicate([myX+37.75,myY+9.5]);  
    I have tried removed the x and y coordinates and run the script again with only duplicate(); it is still breaking the server. Can anyone help???? Hellllpppppp....
    Cheers

    That looks correct - InDesignServer is up & running, waiting for commands, or a control-c to quit.
    InDesignServer.com is a shell app which launches InDesignServer.exe, so having both processes active is correct.
    Once you have successfully serialized (as it appears you have), you should be able to restart either via the Windows service or at the command line without the '-serialnumber' parameter.
    -Brendan O'Shea
    InDesignServer Engineering

  • Adding movies to Indesign automated page-curl swf export

    I know there have been several discussions on this, but I thought I would ask the question anyway.
    I have a magazine created in InDesign, I can add hyperlinks to pages and websites and export it as a nice swf file with a page curl transition. The problem seems to be when anyone wants to edit the Flash file (.xfl), they loose the nice smooth page curl transition, is there no way this can be moved to Flash easily (bear in mind my knowledge of Action script is limited).
    Any help would be much appreciated.

    See this Help topic. From InDesign CS4, you have two ways to create Flash files -- SWF and XFL. If you export to SWF, you can include page curls, hyperlinks, transitions, and navigation buttons. If you export to XFL, you lose any button, hyperlink, or transition you've added in InDesign, and you use Flash Pro to add those things along with fancier animation effects. If you export to SWF, you can't edit the file. If you export to XFL, you have to know Flash Pro well enough to edit the file.

  • Create InDesign Contact Sheet script not working

    I'm using InDesign CS3 and need to create contact sheets for multiple InDesign files. The contact sheets need to have a label with the file name of the document and the page number of each InDesign page in the document.
    I tried to use the Tools > InDesign > Create InDesign Contact Sheet command in the Bridge, but get a message: "Selected Files that are not of the correct type will be skipped" After clicking OK, another message appears: "No Files Selected"
    I wonder if I'm misunderstanding this script.
    I also tried the Print Thumbnails command, but that doesn't allow me to add the file name and page numbers.
    I'd be grateful for any suggestions to lead me on the right path.

    Due to a prolonged, intense project, I'm just now getting back to the problem of creating contact sheets from InDesign.
    I tried the revised script that includes INDD files as suggested by Kasyan, and it works fine.
    However, I apologize for not explaining more clearly, but what I really need to do is create a sheet of miniature InDesign pages, similar to what prints out when choosing Thumbnails in the print dialog. Except that I need the bleed area to show.
    Does anyone know if this is possible?

Maybe you are looking for

  • How can I sort the words in a document into an alphabetical list?

    How can I sort the words in a document into an alphabetical list? Thanks!

  • Is it possible to copy text to the clipboard in Illustrator via Javascript ?

    I am working on a very basic script that exports coordinates from Illustrator. At the moment I am just outputing the values via $.writeln() I was wondering if I could copy the output values to the clipboard. If so, what am I looking for in the API ?

  • Problem with transform(source, result)

    Dear gurus, I have DOM document as source in my java program. The document has data for 1 record insert into a table. The insert will be done on the database side with dbms_xmlsave.insertxml(insctx, xmldoc) where xmldoc is my document and has VARCHAR

  • Forms 10g window size in unix

    Hi, when I migrated from 6i to 10g I added some code to maximize window size in When-New-form-Instance trigger of the form. It works in windows but when I try to run the form in Unix the window size is not big enough to see the whole form. i tried to

  • Problem about F5 and F6 keys

    I was trying to screenshot but sth wrong happen to my backlit F5 and F6 keys and I cant use it ...like i might accidently press command+shift+f5 ...and somehow the backlit keys stop working...  , what should I do? Thank you