Perplexed... Several textFrame content

Oh... help would be so greatly appreciated as I am really confused!


Manual selection to two (or more) blocks of text, how can be done for a loop through, by modifying the properties of all the type contained in each image? I use only the statement 'by' any additional properties that are added will be easy to find and read.

mySel var = app.selection [0] .silence;

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

with (mySel) {

horizontalScale = 200;

kerningMethod = "optical";

}

}

Thanks again for any help!

Hi BrettA,.

There are several ways to do what you want.

For example, you can try something like this:

// select one or more text frames before
var mySel = app.selection;

for (i=0; i

"It seems to be the case, that the" kerningMethod string "should be in your own language.

Have fun

Tags: InDesign

Similar Questions

  • combine several apple content ID

    How to combine music from multiple identifiers in a library? I have most of my music on an apple ID I use more, because it's an email address that no longer exists. Family sharing was a dead-end.

    Sorry, but identifying the content of an Apple can be merged or transferred to an another Apple ID.

  • Coding TextFrame.contents

    Hi guys,.

    Could someone lead me howto use international characters in (e, g. Latin-2) Identifications via com.adobe.ns.InDesign.soap (java SOAP) and javascript CODES, please.

    (a) if I send a utf-8 string next to the IDS, and then it generates the PDF corresponds with the correct characters, but the content of reading at the time the characters are already bad (it seems a character encoding issue)

    (b) if I use base64 encoding in both sides to send and receive letters between the js and java side then reading contains correct characters, but the PDF has bad encoding characters.

    Thanks in advance,

    D

    The JavaScript strings are not UTF8 encoded, they are already Unicode 16-bit characters (and higher values are hard-coded as pairs of substitution of 2 characters). Can you give an example of how 'read the content back' returns in bad characters? It sounds like your workflow assumes that all characters must translate both backward.

  • Format text (balls) with variable = textFrame.contents

    It's been a while since my last InDesign Script...

    I am running a script that works like that;

    • Get the values of a selected xml file configuration
    • Import (products) list from an xml file (given in the configuration file)
    • Selection of the model for each record (given in the list of products)
    • Use the corresponding tag/scriptlabel of the configuration file to select values from an xml file and insert correctly in each textframe and also to place charts by using the same method.
    • Register as a DLI, eps and pdf

    So far so good...

    So far, there has been no need of formatting of the text, the values were only of type 'name', 'price' etc...

    Now, we have a description field, where the customer wants 2-3 lines with bullets as a product description.

    This information is usually given as;

    < productInfo > #informationline 1 #informationline 2 #informationline 3 < / productInfo >

    I can easily convert # for all I want / need to make this work with a search- and -replace, which is not the problem...

    The problem is;

    How to feed InDesign this in a way that makes InDesign create a list of nice uces in the textframe?

    (I tried & #8226; and & #0220;)  "but these creates chips and no dash on line 2..)

    I got the following results, based on what I tried;

    -no bullets

    -dash of ball on line 1, line 2 (no miracle)

    -ball on line 1, dash and the ball on line 2

    -balls on the line, but no dash if line bulleted span two lines...

    (a) (common sense) create a paragraph for your bulleted list style and which apply in your find/replace.

    or

    (b) (Bad/Easy Way) replace by ' ^ 8 ^ t ^ I '-bullet, tab, back up to this point.

  • Replace the selected text with other content TextFrame

    Hello

    I am changing a text selected in something new, involving the movement of text and the paragraph style using a jsx script. At the present time, everything works beautifully:

    • I entered the select text
    • I have create a new temporary TextFrame
    • I build my new paragraphs and apply styles to them in the new TextFrame

    What I was not able to reach still is to replace the original selected text by temporary TextFrame content.

    Any help would be more than welcome

    A part of my script:

    myText = app.selection[0].contents;

     

    ... do some stuff


    var myDocument = app.documents.item(0);

    var myPage = myDocument.pages.item(0);

    var myTextFrame = myPage.textFrames.add();


    myTextFrame.geometricBounds = [0, -70, 150, 70];

    myTextFrame.contents = "Paragraph1\rParagraph2...";


    myTextFrame.paragraphs[0].appliedParagraphStyle = pStyleGroup.paragraphStyles.itemByName('Style1');

    myTextFrame.paragraphs[1].appliedParagraphStyle = pStyleGroup.paragraphStyles.itemByName('Style2');

    And now, in myTextFrame, I have my new paragraph formatted, and I would like to replace the original selected text with the contents of my TextFrame (keeping the paragraph styles).

    Hello

    Keep the logic of the code and edit utilities:

    var
        mSourceIdx = app.selection[0].index,
        mStory = app.selection[0].parentStory,
        mReplaceStuff = {
            elements: [
                ["Paragraph_1\r",  "Style_1"],
                ["Paragraph_2\r",  "Style_2"],
                ["Paragraph_X\r",  "Style_X"]
                ]},
        mTarget, cElement, cText, cParaStyle;
    
    while (cElement = mReplaceStuff.elements.pop()) {
        cText = cElement[0];
        cParaStyle = app.activeDocument.paragraphStyles.item(cElement[1]);    // modify if styleGroups present in a structure
      mTarget = mStory.insertionPoints.item(mSourceIdx);
        mTarget.contents = cText;
        mTarget.paragraphs[0].appliedParagraphStyle = cParaStyle;
         }
    
    app.selection[0].contents = "";
    

    MReplaceStuff allows to prepare stuff to replace

    Jarek

  • [CS5] [JS] How to remove the entire contents of the TextFrame?

    Hello

    I wonder what the best way is to remove ALL the CONTENT (text, graphics, etc.) of a textframe? Previously, I did it in a loop because of the risk of overflow:

    while(TextFrame.Overflow == true) {}

    TextFrame.contents = "";

    }

    It works very well if there is text in the frame, but if there is a graph or if text is horizontal and some vertical is, it becomes an infinite loops because he can't remove the rest of the content.

    It seems that there should be a better way to remove everything from a textframe, anyone know of a way?

    Thanks in advance,

    Lloyd

    Not sure if this is what you want...

    textFrame.parentStory.contents = "";

    Substances

  • in the context of the content of the site-studio edition

    I have to show several studio content using presenter content site. I am able to show them, but I also want to bring in the context of these content editing. My hope is to show a box around each list content publishing.

    I use a content model of presenter to display the list of contents. Now when I press Ctrl + Shift + c, is not nothing happens.
    If I show a unique studio content site it allows you to edit, but not with the content list.

    Is it possible to edit the content when we show a list?

    Thank you
    Sanjeev.

    Well, with a few adjustments, you can create a similar experience for editing multiple filese on a page. See this blog:
    http://George.maggessy.com/2012/05/inline-editing-in-content-presenter-for.html

  • Script to collect the "Master page-text-content of the framework" details

    Hello

    The collection "Masterpage - TextFrame - content" Indesign file details.

    If the spread of the master page text frame, I need to retrieve this text frame content in separate folder. If it possible by Indesign script?

    Thank you

    hasvi

    Hi Hasvi,

    I hope this helps you!

    var doc = app.activeDocument;

    var master = doc.masterSpreads;

    var content = "";

    for (var i = 0; i)<>

    {

    for (var j = 0; j)<>

    {

    If (master [i] .parentPage .textFrames [j]! = null) {}

    content += [i] master .silence .textFrames [j] + "\t" + master [i] .name + "\r";

    }

    }

    }

    var file = new File ("c:/1. txt");

    leader. Open ("w");

    leader. Write (happy);

    leader. Close();

    Kind regards

    Cognet

  • Content rectangle text problem

    Hi all

    I want to insert text in the rectangle.

    After setting the ContentType 'Text' how to insert text in the rectangle?

    I am not found content method of rectangle as TextFrame.content= "indesign"

    myDocument var = app.documents.add ();

    myRectangle var = myDocument.pages.item (0).rectangles.add ();

    myRectangle.geometricBounds is ["70p", "20 p', 40 ' p', 40 ' p'];.

    myRectangle.contentType = (1952412773); for text 1952412773,.

    myRectangle.place(File("/C/version.jpg")); for the image of the place

    How to add text in the rectangle?

    Thanks in advance

    Hello

    To create a rectangle, change its content type and place text-this isn't a shortest path.

    You can do this more easily by creating a textFrame instead of the rectangle;

    But if that's your way of reason:

    You must solve the rectangle after the change of content type for InDesign has indicated to this change.

    It should be like this:

    myDocument var = app.documents.add ();

    myRectangle var = myDocument.pages.item (0).rectangles.add ();

    myRectangle.geometricBounds is ["70p", "20 p', 40 ' p', 40 ' p'];.

    myRectangle.contentType = ContentType.TEXT_TYPE;

    var myTextFrame = resolve (myRectangle.toSpecifier ());

    myTextFrame.contents = "InDesign"

    I hope that...

  • textFrame overflows to the continuity of history

    Hello.

    I'm setting up a newspaper, and I need to print stories in the form of columns in the pages. This works well.

    I use the information returned in textFrame.overflows to know if the story was finished (then go to the next) or keep the same story in the new textFrame of printing.

    But sometimes I got stories with strange strings, like "=" who can not handle the wrapper "text".

    In these stories, the overflow property will be true aways (I never create new frameworks of texts related with the same width, defined in the column). I get an infinite loop here, that I walked it use:

    (if((/^\s+$/.test(textFrame.Contents):! textFrame.contents)

    overflowing = false;

    But it is not very pleasant, once the text is not correctly displayed in the newspaper.

    How can I handle these channels in Adobe Script?

    Thank you

    Dan Koch

    But if you keep pressing '=', the text will appear in the next line.

    Oh. This is interesting. I wonder why this happens?

    But I don't think you should expect InDesign to be able to cut out the words that are defined to be unbreakable and does not fit in the space that assign you...

    However, do you like? I guess you can assume that the characters are pretty much an em-width (most are!), take the size measured in em of the type, divide the width of the box, and you have a number of characters. Subtract a margin (10%? 50%?) It depends) and line break there. If it doesn't, repeat?

    Maybe this could work. I can do this analysis in Adobe Script?

    Sure. It is called ExtendScript, BTW, or you could just say JavaScript. No such thing as Adobe Script.

    Something like this:

    var
        p=frame.parentStory,
        st=p.characters[frame.characters[-1].index+1],
        overset=p.texts.itemByRange(st,p.texts[0].characters[-1]),
        pos = Math.round(
            (frame.geometricBounds[3]-frame.geometricBounds[1])
            *12/st.pointSize*0.9);
    overset.insertionPoints[pos].contents=" ";
    

    In other words, assume that this framework is the framework that we are moving on, which is in excess

    Get the character object that contains the cahracter after a last in the framework.

    Then, get the text from this character at the last range in history.

    Then take the width of the frame (geometricBounds is y1, x 1, x 2, y2), assuming that the units of measure is picas. Multiply by 12 to get points, divide by the pointsize of the first character and multiply by 0.9 for the margin of 10%. Insert a space at this location.

    There are many things to do here, but it seems to work.

  • I have several ID Tags on my Page, how to Correct and change of CLASS ID is.

    Hello Word Dreamweaver:

    I always have problems.

    On my site w www.theexecutivevip.com

    My MENU bar has moved to the bottom to the bottom of the page.

    On the various product pages [problem appears in the Internet Explorer browser]

    I have several "main content" ID tags and other identification labels that are in their midst.

    When I made the page, I did several identification labels, but instead, I made the page in a template

    who had "Repeatable regions" and as I have repeated these areas within a page, the ID's were taken over as well.

    So now, I have more than one ID go to the bottom of my page.  How can I fix and replace them with the CLASS ID

    Of course, I need to make this change on the model, it can CORRECTLY update all pages I built off of it.

    Will it change each page produced manually, because they are all the "editable regions" or can I just change the model. The 'essential' is not a modifiable, but all the products/picture ID box are.

    Please give advice on how I can fix the ID multiple tags for the types of tags appropriate without ruining my work. I tried and it made a mess, so I just did a not save it.

    Thank you for ALL YOUR HELP PEOPLE! I hope that your position soon where I can help people new to Dreamweaver.  I just got a book on html and code so I can learn this world of information that you guys seem to know so well.

    PLEASE ADVISE!

    < div id = "maincontent" >
    < div id = "ProductTitle" > <!-InstanceBeginEditable name = "PageSubTitleID"--> < img src = "Site Images/WebsiteSubTitle.TravelLuggage.jpg" width = "408" height = "114" alt = "Luggage" / > <! - InstanceEndEditable - > < / div >

    < div id = "productlayout" >
    < div id = "Product1" >
    < div id = "image1" > <!-InstanceBeginEditable name = "ProductImage1"--> < a href = "611206.html" > < img src = "Site Images/611026.Black.Thumb.jpg" alt = "Red bag" width = "115" height = "125" / > < /a > <! - InstanceEndEditable - > < / div > ""
    < div id = "imagetext1" >
    < div >
    < h3 align = "center" > <!-InstanceBeginEditable name = "ProductTitle1"--> < strong > 611026 < br / >
    OGIO & copy; Carrier < br / >
    Backpack travel clothing < facilities > <! - InstanceEndEditable - > < / h3 >
    < p align = "center" > <!-InstanceBeginEditable name = "ProductDetailButton1"--> < a href = "611206.html" > < img src = "Site Images/ProductDetail.Button.jpg" width = "97" height = "30" alt = "Product details" / > < /a > <! - InstanceEndEditable - > < / div >
    < p > < / p >
    < / div >
    < p > < / p >
    < / div >
    < / div >

    < div id = "productlayout2" >
    < div id = "leader2" >
    < div id = "image2" > <!-InstanceBeginEditable name = "ProductImage2"--> < a href = "108226.html" > < img src = "Site Images/108226.Thumb.jpg" alt = "Pen" width = "115" height = "126" border = "0" / > < /a > <! - InstanceEndEditable - > < / div >
    < div id = "imagetext2" >
    < div >
    < div align = "center" >
    < h3 > <!-InstanceBeginEditable name = "ProductTitle2"->
    < h3 align = "center" > 108226 < / h3 >
    < h3 align = "center" > < strong > OGIO & copy; < facilities > terminal Travel Bag < / h3 >
    <! - InstanceEndEditable - > < / h3 >
    < / div >
    < p align = "center" > <!-InstanceBeginEditable name = "ProductDetailButton2"--> < a href = "108226.html" > < img src = "Site Images/ProductDetail.Button.jpg" width = "97" height = "30" alt = "Product details" / > < /a > <! - InstanceEndEditable - >
    < / div >
    < / div >
    < / div >
    < / div >

    < div id = "productlayout3" >
    < div id = "Product3" >
    < div id = "3" > <!-InstanceBeginEditable name = "ProductImage3"--> < a href = "109053.html" > < img src = "Site Images/109053.Black.Thumb.jpg" width = '118' height = '127' alt = 'Golf' / > < /a > <! - InstanceEndEditable - > < / div >
    < div id = "imagetext3" >
    < div >
    < div align = "center" >
    < h3 > <!-InstanceBeginEditable name = "ProductTitle3"--> < strong > 109053 < br / >
    OGIO & copy; Travel bag w / detachable cabin < facilities > <! - InstanceEndEditable - > < / h3 >
    < p > <!-InstanceBeginEditable name = "ProductDetailButton3"--> < a href = "109053.html" > < img src = "Site Images/ProductDetail.Button.jpg" width = "97" height = "30" alt = "Product details" / > < /a > <!-InstanceEndEditable--> < /p >
    < / div >
    < / div >
    < / div >
    < / div >
    < / div >

    Send me your site definition (export the complete definition of the Manager of Site of DW).  You have my email address...

  • Problems with export/save the text file in Indesign

    Hi scripters,.

    I have a problem that I don't know how to solve.

    InDesign CS3, Mac and PC - seen as the problem on some Macs, not all, but some still have / get this error.

    I made a script that collects the text of some managers of related texts:

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

    var curTF = myMainList [i];

    while (curTF! = null) {}

    myExportString += curTF.contents;

    curTF = curTF.nextTextFrame;

    }

    myExportString += "\n\n###\n\n";

    }

    alert (myExportString);

    It collects the text and also it will display ok in the dialog box.

    However on some computers (Mac) the following will only produce a byte zero of the file (when there are several textframe in the above loop, a zero-byte file is still produced - but again, it is only on some Mac) If a single textFrame with only a small portion of the text is saved/exported it works:

    var Folder.myDocuments.path = myFolder + "/ Desktop/export";

    //alert ("Myfolder:"+ MyFolder ");

    {if(!myFolder.exists)}

    Folder (myFolder) .create ();

    }

    var myFileName = myFolder + "/" + win. FilePnl.FileGrp.FileName.text + ".txt";

    var myFile = new file (myFileName);

    myFile.encoding = 'text ';

    myFile.open ('w');

    myFile.write (myExportText.replace("/\u2011/g",'-')); Replace (/ [^ a-zA-Z 0-9] + / g, "));

    myFile.close ();

    It has to do with using .silence?

    I hope someone can help me with this summer working on this problem for means of time now.

    Thomas

    Somehow myExportString became myExportText.

    In addition, what happens if you replace the text before write you it

    to deposit?

    Another thing you could try is to cast it to a string as follows:

    String (myExportText)

    Also, maybe try to change the encoding "UTF-8".

    Substances

  • Toshiba 22L1334G gets stand in automatic mode

    Hello

    I'm an agent of technical support for a multinational company and I write about a problem that we have with the following Toshiba TV: Toshiba 22L1334G - 22 "- L1 Series TV LED." We purchased several televisions to our subsidiaries in different countries, if it has a global impact for us.
    The TV is connected to an Intel next unit via an HDMI cable. On the NUC Intel it runs a Media4Display player who runs several multimedia content on TV.

    The problem that appears is that TV will not continually run the content because the next day when I arrive at the office of the TV is already in standby mode, even if the NUC Intel works normally and he doesn't stop the media player.

    I already tried all the settings that are available in the TV menu, as follows:

    1. Fashion store (Enabled - tested-> TV is in stand by mode the next day. Disabled - tested-> TV is in stand by mode next day)
    2. Energy saving mode - he has been on the disabled
    3. Movie mode: it has been tested on both AUTO and OFF mode, the result is the same: TV is in stand by mode next day
    4. Auto setting TV OFF: Off
    5. Power mode: last State (there are also on standby, but this isn't what we want)
    6. Source: HDMI (as this is the way which we the TV connected to the NUC Intel).

    Could you please tell us what other settings that we need to select so that the TV to operate 24/24 h (maybe firmware update is needed? Can you provide me with the old and the firmware update procedure)? It is really important for us that the content is displayed permanently.

    PS: We also have Samsung televisions who do not have this kind of problem, they have been working since the first day (just plug-and-play procedure).

    Please notify.

    Thank you

    The media player PC should also have little energy parameters, if it is executed on the basis of Windows. Are you sure they are disabled, so that when you connect the PC to another view the next day (after the 22 '' TV is off), it will always work and show a picture?
    Just to be sure, that the fault is not related to the playback source, because this sounds like there is an interaction between the source and the screen, which tells the power off display.
    If so, is there an OSD message prominently on TV the next day, when you turn it on manually?

  • SQL question, perhaps with the analytical functions?

    I have a small problem:

    I have a table with:

    DAY_ID, PAGE_ORDER, SID, TIME, CONTENT.

    I want only to the rank (min) of lines with the same content when there is more than

    the one with the same content that follows.

    The data are:

    DAY PAGE_ORDER SID TIMES CONTENT

    20150825 1 4711 25.08.15 06:38:43 / body/home

    4711 2 20150825 25.08.15 06:39:10 home, aufmacher, Home, 42303938

    20150825 3 4711 25.08.15 06:39:15 welcome, aufmacher, Home, 42303938

    20150825 4 4711 25.08.15 06:39:20 home, aufmacher, Home, 42303938

    20150825 5 4711 25.08.15 06:39:24 home, aufmacher, Home, 42303938

    20150825 6 4711 25.08.15 06:39:32 home, aufmacher, Home, 42303938

    20150825 7 4711 25.08.15 06:39:39 home/aufmacher/Home/42303938

    20150825 8 4711 25.08.15 06:39:46 welcome, aufmacher, Home, 42303938

    20150825 9 4711 25.08.15 06:39:49 home, aufmacher, Home, 42303938

    4711 10 20150825 25.08.15 06:39:51 home, aufmacher, Home, 42303938

    4711 11 20150825 25.08.15 06:41:17 pol/art/2015/08/24/paris

    20150825 12 4711 25.08.15 06:42:36 / body/home

    20150825 13 4711 25.08.15 07:06:09 / body/home

    20150825 14 4711 25.08.15 07:06:36 reg/article/memo

    I want as a result:

    20150825 1 4711 25.08.15 06:38:43 / body/home

    4711 2 20150825 25.08.15 06:39:10 home, aufmacher, Home, 42303938

    4711 11 20150825 25.08.15 06:41:17 pol/art/2015/08/24/paris

    20150825 12 4711 25.08.15 06:42:36 / body/home

    20150825 14 4711 25.08.15 07:06:36 reg/article/memo

    Who knows a good way?

    Thank you very much

    It sounds like a simple solution group. You group by content and maybe a few other columns such as the day and sid. So, you want to show some value of inside this group. Several different aggregate functions to do this.

    Not tested, because of lack of tabe create and insert scripts

    select day, sid, content
            ,min(page_order) as page_order
            ,min(times) as times -- if the first page_order also has the first time
            ,min(times) keep dense_rank first (order by page_order) as times2 -- this is needed in case the first page_order is at a later time
    from yourTable
    group by day, sid, content
    

    If Solomon is right, and several identical content may exist (the example data show that). Then we can use the Tabibitosan method to create the groups.

    with step1 as (select t1.*, row_number() over (partition by day, sid, content order by page_order) rn
                         from yourTable
                         )
    select  day, sid, content
             , page_order - rn as group_number
             , min(page_order) as page_order
             , min(times) as times -- if the first page_order also has the first time
             , min(times) keep dense_rank first (order by page_order) as times2 -- this is needed in case the first page_order is at a later time
    from step1
    group by day, sid, content, page_order - rn
    order by day, sid, content, group_number;
    
  • New page on refresh charge?

    Hello world

    I want to make a simple site where you see a phrase and when you click on the button refresh (or / and a button on the page) refreshes the page and a new sentence appears (in some order). So the whole site is a site to a page with several displayed content possible.

    I couldn't find anything on the web, but it could be because I don't know how to describe this parameter.

    I hope that soneone can help!

    Thank you, bart

    You can have a landing page that disappears when you press an object any or after X amount of time, but not when refreshing the page because that should reload the same page as before... a proxy can do but by mistake.

Maybe you are looking for