How get the text of each paragraph when a textStyleRange is made of texts to multiple paragraphs

Hello

Always on my account findText. The result is sometimes as a textStyleRange which contains the texts of multiple paragraphs. What is the best (and easy) way to get the text of each paragraph individually?

Example: The result of an italic findText with the following extract gives me "saectur quatur? " " Ipsapidunte our" as a unique textStyleRange (correct) but I want to get the text of each paragraph.

Is there a way to force the findText in the paragraphs and not those of them and if not, how to cut the textStyleRange in 2 texts?

-----------------------

Our Ipsapidunte and eumquosame derepre id ulparch iliquae offic tem faccusd aecaborrum, sequi aut doloreperi quaectem eatem faces very quam, con nullaccus repratur molorio enis modi sumquibus nostemquam and volorum facidunti nonseditati re a dolut dolorest ab idipitem saectur quatur?

Our Ipsapidunte and eumquosame derepre id ulparch iliquae offic tem faccusd aecaborrum, sequi aut doloreperi quaectem eatem faces very quam, con nullaccus nostemquam repratur molorio enis modi sumquibus and re volorum facidunti nonseditati a saectur dolut dolorest ab idipitem quatur?

There are two solutions:

(1) you could be formatted every paragraph with formatting marks that you know doesn't exist anywhere else. In this way, each textStyleRange is guaranteed to end at the end of the paragraph.

(2) you can access the entire first paragraph: myTextStyleRange.paragraphs [0]. I have not tested, but no doubt it works. You could also do a loop: paraLength = myTextStyleRange.paragraphs.length; for (i = 0; i< paralength;="" i++);="" mypara="myTextStyleRange.paragraphs[i];}">

Tags: InDesign

Similar Questions

  • get the text of the paragraph?

    Hi all

    How to extract text perticular single paragraph object.  I've searched the forums and get the paragraph.texts.itemByRange () methods, but I don't know how to use this method to get the text of perticular and I want to delete the text of the paragraph.

    I would appreciate for any help to...

    Kind regards

    Imagine

    Sorry, that makes it clearer.

    1 itemByRange is useful only when you have the beginning and the end of the range in the form of numbers. What, where you plan to do? Ask in a dialog box from where to where to remove them? The lines "the user has selected" text are just a choice, and you can manipulate that immediately. There is no reason to convert it to a format usable for itemByRange first.

    2. at this stage in your stage of learning, should not focus on Getting the * thing at work, rather than focusing on writing elegant, easy to manage, short but not darkened code? All of you who have no meaning if your script does not run.

  • Call the base-dos .exe file, but how the input parameters and get the text on the screen of the BACK?

    Yes, I tried the similar topic before posting about this.

    I understand that we can use standard input of entrance of parameters of the System exec.vi, but still can not find an answer on "how to get the text on the screen of the BACK.

    1 seal of sw500912_2701test.exe is the exe of Basic-back , (change to rar .tar)

    2. double-click on the .exe, run this file. The first parameter is the rate band, the default value is 9600.

    3. setting the COM #.

    3.

    Can be useful to check that the command is actually being run. When the dos window opens is there any text?

    Try cmd /c "."

  • How to get the text block, given anchor (~ a)

    I need to dynamically position anchored with anchor text blocks (but the relative position will be different for each anchor). If I grep ~ i can get the anchor marker - how to get the text block once I got this marker?

    Thank you

    The marker "anchor" is a character of "simple".

    So you can do the following if you have identified the character (and in this example selected it):

    //Start with an "Anchor Marker" selected:
    var myCharacter = app.selection[0];
    
    if (myCharacter.texts[0].textFrames.length == 1){
    
    var myAnchoredTextFrame = myCharacter.texts[0].textFrames[0];
        //do something with the anchored text frame:
        myAnchoredTextFrame.fillColor = "Yellow";
    
        };
    

    You can set the myCharacter variable differently, if you know the index of the character according to his history of parent.

    Or if you have found the character as part of a search GREP or TEXT by ExtendScript (JavaScript).

    Uwe

  • I have a form in which the text area can be developed to accept more text, but the text does not appear on the printed copy.  How can I get the text to print?

    I have a form in which the text area can be developed to accept more text, but the text does not appear on the printed copy.  How can I get the text to print?

    Hi robinm6200,

    Make sure that you have selected 'Document and annotations' under 'Comments and forms' when printing.

    Kind regards

    Nicos

  • How to get the text of TextEditBox on Panel

    Hi all

    I would ask you, what should I use when I want to get the text of TextEditBox. I have the observer, who listens to the chages (when the user hits enter, the Update method of the observer is called). The only thing I don't know is how to get the text, which was placed in the text edit box. I know that this observer of the dialog box, GetTextControlData method, but I sign...

    THX

    Hi Ondrej

    You can get the text using the ITextControlData interface. Like this:

    InterfacePtr iCtrlView (this, UseDefaultIID());
    if(!iCtrlView) break; put some say message
    InterfacePtr iTextData (iCtrlView, UseDefaultIID());
    if(!iTextData) break; put some say message
    PMString theString = iTextData-> GetString()

    Concerning

    Bartek

  • How can I get the text value of an element XML in MXML?

    Hello


    I have the following XML loaded into a variable of XML type:

    Properties of <>
    the RIMpro data collector Configuration < comment > < / comment >
    < key="server.pear.username"/ entry >
    < key = "enter server.apple.retry.times" > 5 < / entry >
    < Enter key = "rdc.proxy.host" > http://192.168.1.2:8080 < / Entry >

    /Properties >

    I can easily get the key attribute displayed in a DataGridColumn by setting the dataProvider my variable and the data in "@key" area  But I don't know how to get the text value in a second column...  Is it possible or do I have to change my XML to something like this:

    Properties of <>
    the RIMpro data collector Configuration < comment > < / comment >
    < key="server.pear.username"/ entry >
    < key = "enter server.apple.retry.times" value = "5" > < / entry > "
    < Enter key = "rdc.proxy.host" value ="
    http://192.168.1.2:8080"""> < / entry > "

    /Properties >

    Thanks in advance.


    Marc

    Yes, you'd better change your XML structure to fit the internal mechanisms of the DataGrid.

    As model dataField require each element of the grid line to have a named property to display, otherwise you will be forced to overcome this model to the custom help labelFunction for the particular column that will implement your custom actions on how to extract the appropriate data for this column of the grid line item. It will be much more complicated that just reorganize your xml structure.

  • How to get the text have the same effect as the video?

    Hello

    For the first time post here, but I wonder how to get the text of the titles have the same effect as the video behind her.

    For my video, I use 'bad tv' and other effects such as Gaussian that obviously changes the appearance of video, creating the look of VHS. However, I then inserted text via the title, but it normally appears. How can I make this text have the same effects as the video behind it?

    A friend told me I might need to add text to the video first, then do the effects, I have not tried, but wonder if there is an easier way, as this would require me to restart.

    EDIT: That's what I'm looking for. https://youtu.be/7_2PHQI89dI?t=24s The text has the same effect as the video.

    Thank you

    One way is to create a clip made up based on the title and the original clip. Then apply the effect.

    Another way is to use an adjustment layer.

    Good luck.

    Russ

  • How to get the text enum I32 an uncontrollable (I / config terminal p side assets in the DAQmx screws)

    Hello

    I use DAQmx screw create clock.vi channel.vi and sample, they have entered (Terminal configuration of entry) and (active) both are I32 and have enum watch drop-down options. I want to use these text values to put in my excel file, but they give numerical codes associated with respective option. is it possible to get the text as it is.

    It is not an enum but I32 resembling enum...

    Help, please...

    Thank you

    In fact the active side is a control of the ring. Just a click and create a property for text.text ring node. This will give you the selected channel when the property node runs.

    I hope this helps.

  • I'm trying to get the text on the DVD Movie Maker, I can do this and if so, how?

    I want to put the text of the obituary on the DVD of photos that were presented at the funeral.  I can't save it as a .doc and put in the DVD.  If anyone knows how to get the text in a shape any on the DVD that would be very useful.

    Hi Lisa,

    You will need to create a new DVD by editing the file in Windows Movie maker.

    Visit the link provided below to add text to Windows Movie Maker and check if that helps.

    http://Windows.Microsoft.com/en-us/Windows-Vista/Add-movie-titles-and-credits-in-Windows-Movie-Maker

    You can also check out the links below for more information.

    http://Windows.Microsoft.com/en-us/Windows-Vista/make-a-movie-in-four-simple-steps

    http://Windows.Microsoft.com/en-us/Windows-Vista/publish-a-movie-in-Windows-Movie-Maker

  • How do you get the text of a SystemPrompt in C++?

    Hello!

    Currently, I am trying to use a SystemPrompt in my application, but don't understand how to get the text that the user entered.

    I use the example of:

    http://developer.BlackBerry.com/Cascades/documentation/UI/dialogs_toasts/prompts.html

    The example shows:

    void App::onPromptFinished(bb::system::SystemUiResult::Type type) {
        if (type != SystemUiResult::ConfirmButtonSelection)
            {
            qDebug() << "Prompt Accepted:" << text;
            // The user accepted the prompt.
            }
        else {
            qDebug() << "Prompt Rejected";
            // The user rejected the prompt.
        }
    }
    

    In addition to the bug in the example (her if the statement should be == and not! =), I do not understand where text is supposed to be defined.

    Clues on how to get the textvalue?

    Not necessarily, you can recover the sender of a message to the location:

    SystemPrompt * prompt = qobject_cast(sender());
    QString text = prompt-> inputFieldTextEntry();

    I don't know that it will be deleted automatically, it will most likely not. If you can also destroy it in the slot to prevent the accumulation of instances:

    Guest-> deleteLater();

  • How to get the text of a SystemPrompt (Cascades)

    Hello

    I've been struggling with this for a few hours now. I followed the example of "dialogues" on github, so I have successfully created a SystemPrompt (the dialog box that allows the user to enter text and accept / reject). Curiously, in this example there is no use of user text input. Do you know how to get the text in my QML? Here you have an example of code that I use:

    My QML:

    // Default empty project template
    import bb.cascades 1.0
    import bb.system 1.0
    
    // creates one page with a label
    NavigationPane {
        id: navigationPane
        Page {
            attachedObjects: [
                SystemPrompt {
                    id: prompt
                    title: qsTr("Enter a text for the label")
                    modality: SystemUiModality.Application
                    inputField.inputMode: SystemUiInputMode.Default
                    inputField.emptyText: "Label text..."
                    confirmButton.label: qsTr("Ok")
                    confirmButton.enabled: true
                    cancelButton.label: qsTr("Cancel")
                    cancelButton.enabled: true
                    onFinished: {
                        if (result == SystemUiResult.ConfirmButtonSelection) {
                            lab1.text = ????? // Here is where I don't know what to do
                        }
                    }
                }
            ]
    
            Container {
                layout: StackLayout {}
    
                Label {
                            id: lab1              text: "Label text"
                    objectName: "lab1"
                    textStyle.base: SystemDefaults.TextStyles.TitleText
                    horizontalAlignment: HorizontalAlignment.Center
                }
    
                Button {
                    text: "Update label"
                    horizontalAlignment: HorizontalAlignment.Center
                    topMargin: 150.0
                    onClicked: {
                        //_appUi.editLabel();
                        prompt.show();
                    }
                }
            }
        }
    }
    

    Be sure to add this in your .cpp file or all of app:

    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    

    and don't forget to include them in your app .cpp file (probably not all are needed, but just in case I leave here for the moment):

    qmlRegisterType("bb.system", 1, 0, "SystemUiButton");
        qmlRegisterType("bb.system", 1, 0, "SystemUiInputField");
        qmlRegisterType("bb.system", 1, 0, "SystemToast");
        qmlRegisterType("bb.system", 1, 0, "SystemPrompt");
        qmlRegisterType("bb.system", 1, 0, "SystemCredentialsPrompt");
        qmlRegisterType("bb.system", 1, 0, "SystemDialog");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiError", "");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiResult", "");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiPosition", "");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiInputMode", "");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiModality", "");
        qRegisterMetaType("bb::system::SystemUiResult::Type");
    

    Thank you very much

    If you look very carefully by the docs, you'll trip over https://developer.blackberry.com/cascades/reference/bb__system__systemprompt.html#inputfieldtextentr...

    So, replace your? with inputFieldTextEntry() and you will get the text you need.

  • create a children's book? How to get the text over an image?

    I have 13 Adobe elements. Try to get the text on an image. An illustrated image. How can I do this?

    Open the image in Expert mode

    Download the text out of the tool box tool, select the font, the pt size, color and type text.

    Use the move tool to position the text. Note that the text will be on a separate layer, and you must click on this layer to make it active.

  • Get the text of a button when it is read as a node. VBox loop

    I learn JavaFX, and it's just a small matter of programming.

    I have 3 buttons in a VBox. And I want to apply the same 3 effects on all of the buttons after I put them in the Vbox. But when I use a loop and getChildren() on the VBox, they are returned as "nodes". I can't use Button.getText () to find the text of the button.

    Is there a way I can getText to a node? Or maybe convert the current node to a button and get the text in this way?

    VBox, vbox = new VBox();

    Option 1 button = new Button ("first button");

    Option 2 button = new Button ("Second button");
    Option3 button = new Button ("display rules");

    vbox.getChildren () .add (option1);
    vbox.getChildren () .add (option2);
    vbox.getChildren () .add (option3);

    for (button end node: vbox.getChildren ())
    {
    button.setOnMouseEntered (new EventHandler < MouseEvent >)
    {
    @Override
    public void handle (MouseEvent arg0)
    {
    button.setEffect (addEffect (Color.web("#53CFA6"),.8, 10));
    }
    });
    button.setOnMouseExited (new EventHandler < MouseEvent >)
    {
    @Override
    public void handle (MouseEvent arg0)
    {
    button.setEffect (addEffect (Color.web ("#FF6800"),.8, 10));
    }
    });

    button.setOnMouseClicked (new EventHandler < MouseEvent >)
    {
    @Override
    public void handle (MouseEvent arg0)
    {
    button.setEffect (addEffect (Color.web ("#E62800"),.8, 10));

    To do button.getText)
    Button; button.getText (work)


    }
    });
    }

    Hello user,.

    You must have formatted your code correctly. See the forum guides for formatting codes.

    To get the instance of the button, you need to do it safely
    There are two ways to get the instance of the Button.

    for (final Node button : vbox.getChildren()){
         Button b = null;
         if(button instanceof Button){
              b = button;
         }
    
         if(b != null){
              //Do your stuffs here
         }
    }
    

    Or you can even do like that too

    for (final Node button : vbox.getChildren()){
    
         Button b =null;
         try{
              b = (Button) button; //casting the class
         }
         catch(ClassCastException e){
              e.printStackTrace();
         }
    
         if(b != null){
              //Do your stuffs here
         }
    }
    

    Thank you
    Narayan

  • How to get the text in a dynamic text field?

    Hello

    I would like to get the text in a text field I have on stage and put it into a string. I do this because I don't don't want to use the table to store each letter I click. Is this possible?

    Concerning

    you don't know.  You can use the text property of your textfield object and store that value in a variable.

    You can use a click on a button to trigger this code or change event of the textfield or any number of other triggers.

Maybe you are looking for

  • Satellite C650 - 15 X - can I install Windows XP?

    Hello Can I install Windows XP on the Satellite C650-15 X, everything will work (drivers, ethernet etc...)? Kind regards.

  • Satellite A130: Fn key not working only not with Vista - only FlashCards

    Hello I've been looking around in the forums, but I couldn't find solutions to my problem. I have a satellite A130 and I am running a windows VISTA family Basic. I have a problem with my fn functions.I can only use flash on the top of my screen cards

  • My sansa e280 v2 does not recognize my 4 GB sdhc card

    My sansa e280 v2 does not recognize my card sdhc and i ' v ever read other posts, but it does not work. i ' v used in msc mode, but the music does not appear. It happens on the computer, but of course I need extra space. some posts say always use roc

  • A new SSD drive recovery

    I just bought a new EliteBook 8770w and an SSD and I wanted to replace the primary HARD drive, so I created a with the tool HP recovery disk. But when I swap the drives and put only the new SSD and press F11 when starting, no recovery Manager starts.

  • SD - MMC shows G:\ application not found.

    Hello, I am experiencing problem with card reader Realtek PCIE is SDHC (SD - MMC) slot. When I enter a SD - MMC card, a window pops up and it says not found application G:\. I use windows 7 Professional. My PC has 3 USB connectors. All the slots work