Find each text block and the offset of the first base line game...

Hello world

I am currently working with InDesign CS2 files and I want to find all the blocks of text and change its first offset from base to the "height of the capitals. So I tried the below syntax and it says error. Please help me for this.

Thanks in advance

//==================

#target InDesign4.0

myFrame var = app.activeDocument.textFrame.everyItem ();

for (var i = 0; i < myFrame.length; i ++) {}
myFrame [i].textFramePreferences.firstBaselineOffset = 1296255087;
}
Alert ("DONE");

//==================

Concerning

Indana

var myFrame = app.activeDocument.textFrames.everyItem().getElements();

for (var i=0; i 
         

Tags: InDesign

Similar Questions

  • Script to remove all the images, text blocks, and the page numbers on a layer

    I have a 364 pages with 322 illustrations, photographs mainly, for offset printing.

    The photographs will be be overprinted with the varnish on a plate in the fifth, and I set it up as follows:

    On a new layer, (double layer 1) all photos are removed, but not their mounts.

    The frames are then filled with 100% black.

    All text blocks and page numbers must also be deleted.

    I realize I could have done this job easier if I put all the images on their own layer first, but unfortunately I do not have.

    And I don't do myself, script, so I was wondering if anyone has a script that will do...

    With the help of CC 2015.1 on Windows 7.

    Today, I don't have time to finish, which gave time to until now is the following:

      var myDocuments = app.documents.everyItem();
        var myLayers = myDocuments.layers.everyItem();
        var myStories = app.activeDocument.stories.everyItem().getElements();
        var myDoc = app.activeDocument;
        var myLayer = "palette"; //Add your layer name here
        var NewLayer = myDoc.layers.item(myLayer).duplicate();
        myDocuments.pageItems.everyItem().locked = false;
        myLayers.locked = false;
        myDoc.layers.item(myLayer).visible = false;
        NewLayer.name = "SampleNew";    //Add your new layer name here
    
                    re();
                    function re(){
                        var link, image;
                        var openDocs = app.documents;
                        var openDocsLen = openDocs.length;
                        for (var d = 0; d < openDocsLen; d ++){
                        currDoc = openDocs[d],
                        links = currDoc.links,
                        counter = 0;
                        myLayer.locked = true;
                        myDocuments.layers.item(myLayer).locked = true;
                            for (var i = links.length-1; i >= 0; i--) {
                                if (links[i].hasOwnProperty('relink')) {
                                    try {
                                        link = links[i];
                                        image = link.parent;
                                        image.remove();
                                        counter++;
                                    }
                                    catch (err) {
                                        $.writeln(i + " - " + err);
                                    }
                                }
                            }
                        }
                      }
    
            var myStories = app.activeDocument.stories.everyItem().getElements();
            for (i = myStories.length - 1; i >= 0; i--){
                var myTextFrames = myStories[i].textContainers;
                for (j = myTextFrames.length - 1; j >= 0; j--){
                myTextFrames[j].remove();
                }
            }
    

    If nobody finished the second finalized.

    Hug!

  • out the anchor text block and copy its contents

    Hi all

    I have a script that will be able to anchor to InDesign text block and it works well. Now my problem is that I released that anchored text frames and then copy its contents the same position where the text block was at anchor.

    Here's what I do:

    1. find and block of text of a document (using the find object, anchored by its applied object style).

    2. release the anchored object found.

    3 copy its contents the same position where it was anchored.

    For 1 and 2 rep, I maybe able to do but point 3 I have no idea.

    Hope someone can lend me the time to solve this problem.

    Thanks in advance for any help.

    -elmer

    then, instead of myFrame.releaseAnchoredObject (); use myFrame.remove ();

  • I need to select all the blocks of text in a document and align text blocks in the back pages left frame margin and the text in the pages front to the right margin.

    Hello

    Am new to Java script.

    Can someone help me out here, I need to select all the blocks of text in a document and align text blocks in the pages back to the left margin frames and text in pages recto at the right margin.

    Thank you
    Harish

    Hi Harish,

    Try this.

    var doc =app.activeDocument,
        _pages = doc.pages;
    doc.viewPreferences.rulerOrigin = RulerOrigin.pageOrigin;
    for(var i =0;i<_pages.length;i++)
    {
            txfms = _pages[i].textFrames.everyItem().getElements();
            for(var j =0;j
    

    Kind regards

    Cognet

  • Apply effects to the text block and not the text

    I am trying to apply a shadow to a text block, but he keeps applied the effect of text rather than the text block.  I click on the text block, and then effects and shadow and object is selected in the 'Settings For' drop-down box.  However, he maintained the application of the shadow to the text, rather than to the text block.   I am doing this wrong, or is there something else I need to do?

    I use CS4 on Windows Vista.

    Thank you!

    Change your fill of paper or whatever is the shading color.

  • When I send a text message and mobile data are off, it is not given, but I do not see this message for a few minutes. I can then refer using "send as a text message. How can I 'send as a text message' in the first place?

    When I send a text message and mobile data are off, it is not given, but I do not see this message for a few minutes. I can then refer using "send as a text message. How can I 'send as a text message' in the first place?

    Disable the iMessage?

  • My MSN account was blocked and the other recorded with her email address is no longer active so I can't get a verification code.

    My msn account was blocked and the other recorded with her email address is no longer active so I can't get a verification code. What should I do?

    Hi Harryjenkins,

    I suggest you to contact MSN support for assistance on this issue:

    How to contact MSN customer service

    http://support.Microsoft.com/kb/940784

    You can also visit the site mentioned below and check if it helps:

    http://windowslivehelp.com/solution.aspx?SolutionID=283b059b-d26d-41f9-ae3d-03a07afcb4ad

     

    I hope this helps.

  • URGENT::opening multiple files - i have 3 files in my directory... When I run the code I can open a file and read it... but the while loop get blocked after the first iteration... can someone me help or give some indications

    bbmChatDB of public database;

    public static FileConnection fconnRead = null;
    public static String fileReadData = "";
    public static InputStream is = null;
    data Byte [] = null;
    DataInputStream is = null;

    Here is my code...

    I have 3 files in my directory... When I run the code I can open a file and read it... but the while loop get blocked after the first iteration... can someone me help or give some indications

    try {}

    FileConnection fc = Connector.open("file:///store/home/user/documents/BSM/") (FileConnection); "

    If (fc.exists ()) {}

    Enumeration e = fc.list ();

    While (e.hasMoreElements ()) {}

    System.out.println ("files are:" + (String) e.nextElement ());

    play this file
    StringBuffer stringBuff = new StringBuffer();
    try {}
    System.out.println ("opening file")-;
    System.out.println ("file name is:" + (String) e.nextElement ());
    fconnRead = Connector.open("file:///store/home/user/documents/BSM/(String)e.nextElement(),Connector.READ_WRITE) (FileConnection);
    System.out.println ("data length")-;
    If (fconnRead.exists ()) {}
    is = fconnRead.openDataInputStream ();
    data = IOUtilities.streamToBytes (is);
    Ddd = new String string (data);
    fileReadData = ddd.toString ();
    System.out.println ("length of data:" + fileReadData.length ());
    System.out.println ("read data :" + fileReadData);

    }

    } catch (IOException ee) {}
    ee.printStackTrace ();
    System.out.println ("Exception in the read data :")
    + ee.getMessage ());
    }

    }
    }

    } catch (IOException e) {}

    e.printStackTrace ();
    }

    {Finally

    try {}
    If (is! = null) {}
    is. Close();
    }
    System.out.println ("is closed...");
    } catch (IOException e1) {}

    E1. PrintStackTrace();
    }

    If (fconnRead! = null) {}
    try {}
    fconnRead.close ();
    } catch (Exception e) {}
    System.out.println (try ());
    }

    }

    }

    You can recode this treatment so that it uses only:

    e.nextElement ())

    Once a loop iteration.

    Directly at the start saying something like:

    String fileName = e.nextElement ());

    and use fileName everywhere in your loop.

    Also be aware that printStackTrace() will do nothing in your situation, it only works if you catch Throwable.  So make sure you something output all your catches exception and also have a catch (Throwable t) to catch the things you miss, as follows:

    {} catch (Throwable t)

    t.printStackTrace ();

    System.out.println ("Eception exception:" + t.toString ());

    }

    I think your code is thrown an exception and you don't see it.

  • On Windows 7, how to implementing automatic uppercase the first letter of the first book and the first letter after each period?

    I'm using Windows 7, how do I configure my system automatically capitalized the first letter of the first word and the first letter after each period?

    Thank you

    Lisa.

    Hello Lisa,.

    It's more to do with the word processor on Windows. You don't say what word processing software you use. If you use WordPad which comes free with Windows, it is impossible to do what you want to do. However, if you are using Microsoft Office Word (that you can buy) then the CAP is set by default.

    This forum post is my own opinion and does not necessarily reflect the opinion or the opinion of Microsoft, its employees or other MVPS.

    John Barnett MVP: Windows XP Expert associated with: Windows Expert - consumer: www.winuser.co.uk | vistasupport.mvps.org | xphelpandsupport.mvps.org | www.silversurfer-Guide.com

  • How to unlock objects in spread? My can´t objects be moved (stand picturesboxes and text boxes), and the control/opt/L command is not available. Anyone know how to do? Maria

    How to unlock objects in spread? My can´t objects be moved (stand picturesboxes and text boxes), and the control/opt/L command is not available. Anyone know how to do? Maria

    Try trashing preferences. See replace your preferences

    And please turn off or remove the autoquote bey email for the answer. Thank you.

  • CFDOCUMENT cut the last and the first line in the pages

    Hello, all:

    I use the CFDOCUMENT tag to create a pdf file. It's a line of simple text and images (for example, width = height 58 = 58). All right,
    but the last line and the first line fell by half. The line is half pages.
    I have download correction [hf701 - 60212.zip], but have the same problem.

    Please tell me how to set the page layout?
    I use windows XP. the text is displayed as < PRE > tag, pictures < IMG SRC = "" * "width = height 58 = 58 >."

    Kind regards

    There are several fixes to this problem. Latest fixes just be published in the last several days. If you use cfmx7.01, you must apply the hotfix in this technote. This fix should be used even if you have applied the hotfix rollup 2 for 7.01 or you apply the individual hotfix (hf701 - 60212.jar) prior to 04/08/2006.

    If you use 7.02, you must apply the fix of this technical note. Apply the additional fixes to cfdocument, he released with 7.02.

  • Popup lov (retrieves the filters and the first set of rows) returns the id

    Hello

    I have a problem when using a popup lov (retrieves the filters and the first set of rows). My LOV is a list of people posting their names, and it works very well when the popup opens. But in the "textfield" showing that you have chosen the corresponding id is displayed. This is not what I want. I want the name to be displayed.

    Any help would be greatly appreciated,

    Bram.

    Bram

    The text field is filled in with the return value.

    If you have

    SELECT name, id
    FROM table
    

    ID will be returned to the text field. If you want the name displayed, then it should be...

    SELECT name a, name b
    FROM table
    

    If you want to use the ID later, behind the scenes, then you could calculate it according to the name.

    See you soon

    Ben

  • someone at - it an idea on how I can get counter strike so run faster on my pc and not so little = specific, is the first person shooting game and not looking to spend money? Please and thank you!

    someone at - it an idea on how I can get counter strike so quickly on my pc and not so fragmentary and lag., is the first person shooting game and not looking to spend money?  someone help me please! and thank you!

    # You have not given any information, except for what you are trying to run.

    As far we know you run with some processors Sempron/Celeron and 512 MB shared memory with an on-board video camera.  In addition, you might have a suite of protection oversized running on your system to keep you safe from Internet predators and a bunch of other things you love continues to run in the background.

    Here again, you can have a dual core or higher processor 1.8 GHz or more fast speed with 1 GB or more of memory and a 512 MB or higher video card (do not share memory with the system) which has installed the most recent drivers.  Also you can have only a basic product antivirus running, by using the built-in Windows Firewall and you want to keep your system with as little as possible run so that most of your resources are available.

    Probable - in any case - other than generalities such as:

    (1) make sure that few runs when you play the game (with the exception of the game) as possible.
    (2) make sure that you have the latest video card driver installed for your video card.
    (3) make sure that you have the latest driver installed for your motherboard chipset.
    (4) make sure that you have the latest audio driver installed for the audio device.
    (5) make sure that you have the latest network driver installed on your device on the network.
    (6) run the game with its smaller settings with the same extras disabled as you can stand it.  Shadows are nice - but will slow down your system.

    And the advice that you said that you do not want to (while remaining general because we do not know the details of your system):

    (1) buy a more grand/more fast video card to replace yours.
    (2) buy more memory system in case you run low during playback.
    (3) replace your processor with the highest that will take care of your particular motherboard.

    And the most extreme:

    (1) buy a system that has a little above the minimum specs for the best interpretation of this game is that you are trying to play.

  • Problems with sorting of columns and the number of lines in the report

    Hello

    I'm having a problem with sorting of columns and the number of lines displayed in a report.

    This report displays the data correct, but if I try to sort on a column when I click on the column heading in the report returns no line... I need to click on the "go" button to refresh the report (with the column sorted now) in to display the data.

    Similarly, I display only 15 lines per page. If I try to view the lines 16-30, 31-45, etc., that it returns no line until I click on the 'go' button to refresh again.

    Has anyone else had (and overcome) the same problem?

    Thank you

    Joseph

    Joseph,

    2 questions:

    1) are you using the elements referenced by the report page to filter etc.. ? If so, you're failing values of these when the loading of the page?
    (2) are you using PPR page through the results?

    If so, it could be a problem with the different types of session state, as Anton Nielsen blogged about here:
    http://c2anton.blogspot.com/2008/12/Oracle-Application-Express-Apex-three.html

    If so, you can use calculations or processes to set element values in session state persistent during page rendering, as Anton mentions. In this way, when you use PPR page values will be available in session state and your report should work fine.

    Anthony.

  • How to add two lines when the second row is not visible, but also gets the first data line too?

    Mr President

    Jdev worm is 12.2.1

    How to add two lines when the second row is not visible, but also gets the first data line too?

    I want to add two lines like below picture, but want the second to remain invisible.

    tworows.png

    I asked this question but my way of asking was wrong, that's why for me once again.

    Concerning

    Try to follow these steps:

    1. in the database table to add the new column "JOIN_COLUMN" and add the new sequence "JOIN_SEQ".

    2. Add this new column in the entity object. (You can add this in entity object by right clicking on the entity object and then select "Synchronize with database" then the new column and press on sync)

    3. in your bookmark create button to create only one line NOT 2 rows.

    4 - Open the object entity--> java--> java class--> on the entity object class generate and Tick tick on the accessors and methods of data manipulation

    5 - Open the generated class to EntityImpl and go to the doDML method and write this code

      protected void doDML(int operation, TransactionEvent e)
      {
        if(operation == DML_INSERT)
        {
          SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
          oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
          setJoinColumn(seqValue);
          insertSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        if(operation == DML_UPDATE)
        {
          updateSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        super.doDML(operation, e);
      }
    
      private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "Insert into table_name (COLUMN_1,COLUMN_2,COLUMN_3,JOIN_COLUMN, HIDDEN_COLUMN) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + joinColumn + "', 1)";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
      private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "update table_name set column_1='" + value1 + "', column_2='" + value2 + "', column_3='" + value3 + "' where JOIN_COLUMN='" + joinColumn + "'";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    

Maybe you are looking for