Heights of game for all the blocks of text in a document

Looking to do something seemingly simple. I want all the blocks of text in my document to the same height.

Here's where I am.

app.activeDocument.textFrames.everyItem () .height = "2.3195 in."

Note: I work in InDesign CS5.

Any help on where to go from here would be greatly appreciated.

Or, in the CS6 and later*:

var NEW_HEIGHT = '2.3195 in';

// MULTIPLE RESIZE() IN ONE STEP
// =============================
app.activeDocument.textFrames.everyItem().resize(

    // Target bounding box(es) -- Use OUTER_STROKE_BOUNDS if needed
    // ---
    [CoordinateSpaces.INNER_COORDINATES, BoundingBoxLimits.GEOMETRIC_PATH_BOUNDS],

    // Reference point -- Here resize is performed relative to the top edge
    // ---
    AnchorPoint.TOP_CENTER_ANCHOR,

    // Absolute replacement
    // ---
    ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH,

    // [width, height] in points
    // ---
    [ResizeConstraints.KEEP_CURRENT_VALUE, +UnitValue(NEW_HEIGHT).as('pt')]
    );

* Can operate CS5. x too, but I think remember that CS4 has a bug where resize() is a plural specifier whose receptors belong to several blocks spread.

@+

Marc

Tags: InDesign

Similar Questions

  • 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

  • Deleting all the blocks of text hidden unexpectedly removes blocks of text embedded (but visible). Why?

    I try to use the code below to remove all the blocks of text hidden in a document. It is works quite well, BUT for some reason, removes the visible anchor text blocks.

    (the argument currentTextFrame.length is to prevent it remove hidden text blocks if the content is threaded, in which case the text is redéroule then in blocks of text that is visible.) I need to find a solution to this, but it's tomorrow problem.)

    I have a similar function to allGraphics and does not remove the anchored frames.

    Can someone point me in the right direction? I can add a check to see if the text block is anchored, but I fear that I might get bored the biggest problem.

    var myDocument = app.activeDocument;
    var myTextFrames = myDocument.stories.everyItem().textContainers.reverse();
    var myTextFramesLength = myTextFrames.length;
    for ( i = 0; i < myTextFramesLength; i++ ){
         var currentTextFrame = myTextFrames[i];
         if ((!currentTextFrame.visable) && (currentTextFrame.length ===1)){
              currentTextFrame[0].remove();
         }
    }
    
    

    _9781101983546_EPUB_SBs_indd___100_.png

    Edit: What is happening in 2014.0 and 2015.1, OS x 10.10 CC

    Post edited by: Naomi Kennedy

    Hi Naomi,

    and there is an array of arrays with:

    myDocument.stories.everyItem().textContainers
    

    Try this:

    var a = app.documents[0].stories.everyItem().textContainers;
    for(var n=0;n
    

    I suggest the following, which should work:

    var doc = app.documents[0];
    var myStoriesArray = doc.stories.everyItem().getElements();
    var storiesLength = myStoriesArray.length;
    
    var textContainersToRemoveIDs = [];
    
    for(var n=0;n
    

    Uwe

  • by selecting all the blocks of text on all visible layers

    I want to select all the blocks of text on all visible layers.

    the script below will select all the blocks of text, even in groups, but if the layer with the text is invisible the script error. (target layer cannot be changed)

    If (app.documents.length > 0) {}

    var doc = app.activeDocument;

    var numTextFrames = 0;

    for (i = 0; i < doc.textFrames.length; i ++) {}

    textArtRange = doc.textFrames [i];

    textArtRange.selected = true;

    }

    }

    So I made this script to select blocks of text on only visible layers, but now missing text belonging to a group.

    var layerCount = activeDocument.layers.length;

    var docSelected = activeDocument.selection;

    for (i = 0; i < layerCount; i ++)

    {

    currentLayer = activeDocument.layers [i];

    If (currentLayer.visible == visible)

    {

    for (j = 0; j < currentLayer.textFrames.length; j ++) {}

    textArtRange = currentLayer.textFrames [j];

    textArtRange.selected = true;

    }

    }

    }

    can someone tell me why it is not some frames of text bound in a group when made this way and is it possible to get all managers of related texts selected on all visible layers?

    Thank you

    Duane

    Try this:

    if (app.documents.length > 0 ) {
        var doc = app.activeDocument;
        var numTextFrames = 0;
        for (  i = 0; i < doc.textFrames.length; i++ ) {
            try {
            textArtRange = doc.textFrames[i];
            textArtRange.selected = true;
            } catch (e) {}
            }
        }
    

    Have fun

  • I can auto adjust all the blocks of text with overset text?

    Due to several factors (change computers, versions of different fonts, etc.), I had to change most of the fonts in my text-heavy document.

    There are a lot of charts and tables in this 125-page document, and now most of all text frames have overset text.

    The new font is in fact identical to the previous one, however, there are a few differences that are causing it take more text frames. I tried to adjust the line spacing in my character and paragraph styles, but these do not seem to effect.

    Is there a way to automatically adjust all frames in excess to account for the new font?

    Thanks in advance.

    Not sure that the result will be 100% desirable, but there is a way to define all frames to auto-size...

    Run find/replace and choose the tab object.

    Down, choose the Document research: menu. Choose the blocks of text such as: menu.

    Click the icon of glass/frame next to the search Object Format field:

    In the Options of Format object search dialog box, choose Auto setting 'Off' on the text size Options > menu automatic sizing:

    Click OK, and then click the icon / window next to the subject of change Format field:

    In the change object Format Options dialog box, choose 'Height' only on the text size Options framework Auto > auto-size menu, and then click the up button in the Center in the framework - pinning proxy:

    Note: Another option for pinning would be better according to your presentations, but this setting will make executives grow at the bottom, which seems the most logical... in most cases.

    Click OK, and then change all.

  • CS3/4 question, Amateur of JS: how to remove all the blocks of text empty?

    I am an amateur and thought it would be a simple matter to write a script that simply deletes all empty all text blocks in all stories of a document. Here is my second attempt:

    myDocument var = app.activeDocument;

    var myStories = myDocument.stories;

    for (i = 0; i < myStories.length; i ++) {}

    var monarticle = myStories [i];

    var myTextFrames = myStory.textContainers;

    for (j = myTextFrames.length - 1; j > = 0; j-) {}

    If (.silence myTextFrames [j] == ' ') myTextFrames [j] .remove ();

    }

    }

    The problem is sometimes it works as intended, but sometimes with multiple stories, it must be executed many times. Can someone explain why this is?

    Thank you - Jeremy

    Your problem is that you treat the stories forward, but are

    removal of the stories completely empty, then the script will skip the

    stories after that removed.

    You must do one of the following:

    (1) do not remove the first picture on any topic.

    (2) use a loop for the stories

    (3) convert the stories collection into an array:

    var myStories = myDocument.stories.everyItem () .getElements)

    Substances

  • my collection of Microsoft solitaire' sez mid game for free. a block to the top with code #303019

    Separated from this thread.

    my collection of Microsoft solitaire' sez mid game for free. a block to the top with code #303019

    Hi Louise,.

    Let me help you with this.

    1. What are the troubleshooting steps you have done?
    2. This problem only occurs with the Microsoft Solitaire Collection or other games as well?

    I suggest you to bring the observer log files event to find the exact cause, which is the origin of the problem.

    Follow the steps to collect the log files:

    • Go to start, type event viewer. This will bring up the tile of the event viewer , click here to open the event viewer.
    • In the left pane, expand Windowslogs. Click on Application log and highlight the first event in the log and use the arrow keys to scroll down.
    • Most of your event will be information. You may see errors of Redor yellow warnings . If you see a red error, you can double-click on it to bring it and copy the contents into a document.

    Please answer us with this information and the current state of your computer, we will be happy to help you further.

    Thank you

  • my pc CPU running at 100% for all the programs I opened / what is the problem and how to solve?

    my pc CPU fan runs very strongly & the processor running at 100% for all the programs I opened. DO NOT KNOW IF IT IS A VIRUS IN THE PC WAS WORKING FINE A FEW DAYS AGO. How can I solve this issue?

    Hello

    You did changes to the computer before this problem?

    Step 1: Check if the problem persists in the clean boot state.

    From your computer by using a minimal set of drivers and startup programs so that you can determine if a background program is interfering with your game or program. This type of boot is known as a "clean boot".

    Reference:
    How to configure Windows XP to start in a "clean boot" State
    http://support.Microsoft.com/kb/310353

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:

    1. click on start and then click Run.
    2. type msconfig and click OK.

    The System Configuration Utility dialog box appears.

    3. click on the tab general, click Normal Startup - load all services and device drivers and then click OK.
    4. When prompted, click on restart to restart the computer.

    Step 2: Also, look for error messages in the event viewer. If you find error messages after return the exact error message so that we can help you better.

    Reference:
    Using the event viewer
    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/snap_event_viewer.mspx?mfr=true
    Understanding of event viewer
    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/event_overview_01.mspx?mfr=true
    Procedure to view and manage event logs in Event Viewer in Windows XP
    http://support.Microsoft.com/kb/308427

    I would also refer the below article which may be useful.

    The CPU utilization reaches 100 percent when you run programs after you install Windows XP Service Pack 2
    http://support.Microsoft.com/kb/890582

  • (1) is there a function for all the object of the same size?

    (1) is there a function for all the object of the same size?

    Sorry, I thought you wanted to align the objects.

    We do not have the function to make items of the same size. You must change one by one. To change the .lks file may be more effective.

  • Thanks for all the answers

    Thanks for all the answers

    Windows XP's Wordpad which has more features then Notepad. However, if you want more features, you must purchase Windows Office 2003, 2007 or 2010.

    You can also do a search on Initernet and find other 3rd office products that you can use. Some are free and others you can buy.

    Windows XP also included speech recognition. However, in Windows 7, speech recognition is most perfect.

    Article number: 306901 - how to use speech recognition in Windows XP
    http://support.Microsoft.com/kb/306901
     
    Article number: 306902 - how to configure and use text-to-speech in Windows XP and Windows Vista
    http://support.Microsoft.com/kb/306902
     
     
     
    I hope this helps.

    Marilyn

  • just has got rid of the virus and responsible for all the disks but given the wifi does not work

    WiFi doesn't work do not

    just has got rid of the virus and responsible for all the disks but given the wifi does not work

    Hello

    Check with the system manufacturer or the actual WiFi device manufacturer and ask in their forums (if any)
    for problems known.

    Actually, try updating your driver:

    Control Panel - network - write down of the brand and the model of the Wifi - double click top - tab of the driver - write
    version - click the driver update (cannot do something that MS is far behind the pilots of certification). Then
    Right click on the Wifi device and UNINSTALL - Reboot - it will refresh the driver stack.

    Look at the sites of the manufacturer for drivers - and the manufacturer of the device manually.
    http://pcsupport.about.com/od/driverssupport/HT/driverdlmfgr.htm

    How to install a device driver in Vista Device Manager
    http://www.Vistax64.com/tutorials/193584-Device-Manager-install-driver.html

    Download - SAVE - go where you put it - right click – RUN AS ADMIN.

    You can download several at once however restart after the installation of each of them.

    After watching the system manufacturer, you can check the manufacturer of the device an even newer version. (The
    manufacturer of system become your backup policies).

    Repeat for network (NIC) card and is a good time to get the other updated drivers as Vista like
    updated drivers.

    I would also turn off auto update for the drivers. If the updates Windows suggests a just HIDE as they
    are almost always old, and you can search drivers manually as needed.

    How to disable automatic driver Installation in Windows Vista - drivers
    http://www.AddictiveTips.com/Windows-Tips/how-to-disable-automatic-driver-installation-in-Windows-Vista/
    http://TechNet.Microsoft.com/en-us/library/cc730606 (WS.10) .aspx

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • In Windows Media Player 11, I would like to change the album art integrated for all the songs in an album while removing all previously used album art.

    In Windows Media Player 11, I would like to change the album art integrated for all the songs in an album while removing all previously used album art in advanced tag editor. My mP3 player only displays art on top of the list of advanced tag editor and WMP automatically puts most recent album on the background art. Is there a way to change this?

    Hello

    Try the following steps:

    a. connect to the Internet.

    b. open Windows Media Player.

    c. click on the Library tab, and then go to the album you want to resolve.

    d. right click on the album and then click on Find Album Info.

    e. If you get an error message that says you must change your privacy settings before you can update media information, follow these steps: click on the Tools menu, click Options, click the Privacy tab, and then clear music update files by retrieving the news media from the Internet check box. Then, in the library, repeat the previous step.

    See the following articles for more information:

    http://Windows.Microsoft.com/en-us/Windows-Vista/wheres-my-album-art-fixing-song-titles-artist-names-and-more-in-Windows-Media-Player

    http://Windows.Microsoft.com/en-us/Windows-Vista/add-or-change-album-art-in-Windows-Media-Player

  • Spanning tree Distribution Switch Port is root for all the VLANS

    Hello world.

    Uplink to switch on 2 layer network flat if Distribution change a.

    This distribution uplink port is Root Port.

    Core switch port goes to the Distribution switch appears as State PLEASE FWD.

    It will cause slow for users who are connected to the network on the Distribution switch?

    According to my understanding core should be Root STP for all the right of VLAN?

    If necessary how can I make kernel as root port switch port?

    Thank you

    MAhesh

    Hello

    a root is a designated port (if shipping port) on a non-root bridgewhich a path root the lowest cost to the root bridge. So there is nothing unusual here, and your kernel needs to be done to root bridge if you run STP between distribution and kernel as you apparently.

    Kind regards.

    Alain

    Remember messages useful rate.

  • How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?

    Hello

    How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?

    Thank you

    Jay.

    Select the connection and right-click on it and select schema statistics collection

  • How to disable the button create and edit button in IMPORT environment for all the modules of 6.1.1.1?

    Hi all

    I am trying to disable some built-in options for all modules as well as all users in paragraph 6.1.1.1.

    How to disable the button create and edit button in IMPORT environment for all the modules of 6.1.1.1.?

    Please help me solve this problem.

    Thank you

    Nefertari

    Thank you Ivy, Yes.

    I made some changes more in environment settings that helped me to turn off the button the user create a user/edit.

    Thank you

    Nefertari

Maybe you are looking for