[JS] Get the next paragraph

I'm quite used to scripts in AppleScript and by train to try to 'translate' one of my scripts JavaScript - and I'm stuck.

I am looking for a story for paragraphs (with findGrep), and then I have to loop through the paragraphs found. Now, I need to get an object reference of the found paragraph and after tha, the following paragraph of history (not the following paragraph in the results of the research).

It's easy to get the found paragraph:

var first_paragraph is found_paragraphs [i].paragraphs.firstItem ();.

But how do I get the following paragraph of the story?

I would increase the object (text style range) of the found_paragraphs [i] reference in AppleScript, but I do not know how in JS?

Thanks in advance!

Thomas

var nexttPara =

found_paragraphs [i] .paragraphs [-1] .insertionPoints [-1] .paragraphs [0];

Substances

Tags: InDesign

Similar Questions

  • My MacBook Pro was built in mid-2009, I understand that I won't be able to get the next Sierra of OS.  I just put a new hard drive 700 GB, more I added a new battery to include a new CD/DVD drive.  I spent more than 400 million dollars. What I need to by

    My MacBook Pro was built in mid-2009, a 2.6 GHz, 13-inch, I just put a new hard drive 700 GB and I added a new battery to include a new CD/DVD drive.  I spent more than 400 million dollars.

    I understand that I won't be able to get the next Sierra of OS. I need to by a new Mac?

    Talk to the people the more I would get if I turn in I'd get is about are about $ 100 million.  Please tell me it isn't so.

    If you want Siera you will need a new Mac, but you can continue to use the old one as long as you want.

  • How can I get the current paragraph?

    I want to get the current paragraph where the insertion point is.

    How can I do this in FDK?

    Ch,

    I can answer some of these questions, but if you have decided that this thread is replied, please give credit to Mike.

    About the audit for a FO_Pgf object, you shouldn't have that. I think that there is some obscure cases where F_ApiGetTextRange() gives you an object that is not a paragraph... I forgot exactly but I think it has to with a text graphic subject line or something like that. I could be wrong. In any case, if you have a stream of regular text with an insertion point, you will get a paragraph object.

    This line will abort the operation if any text is selected. Do you really want that?

    If (insertionPoint.beg.objId! = insertionPoint.end.objId)

    This line will abort the operation if several paragraphs are selected. Do you really want that? Without this verification, you will always get the text of the first selected paragraph.

    If (insertionPoint.beg.offset! = insertionPoint.end.offset)

    Otherwise, the code looks OK to me, at least regarding the FDK calls. You have problems with him?

    Russ

  • When we try to create a shape with a predefined size above 10 x 10 inches of ps cs6, we get the next value in A message between 0.00 10.00 inches and thumb is necessary.  Close value inserted.

    When we try to create a shape with a predefined size above 10 x 10 inches of ps cs6, we get the next value in A message between 0.00 10.00 inches and thumb is necessary.  Close value inserted.

    You could put in your dimensions in the boxes of fixed size .

    Then just click on you document and move the object slightly before releasing the mouse if you don't get this pop up dialog box to create a Rectangle rounded.

  • Get the next row in the set of results under certain conditions

    Hello
    I have a result set with a column in ascending order of the numbers. Now, I want to compare these numbers to a value. If one of the numbers exactly matches the value then all is well and I use number < = value as a condition. If the value does not match exactly I want to get the next number in the result as well. A short example

    NB in resultset
    41
    82
    123
    164
    205
    246

    To compare with value = 200, I want to have

    41
    82
    123
    164
    205

    as a result.

    To compare with value = 164, I want to have

    41
    82
    123
    164

    Thanks for any advice.
    Carsten cordially

    You can use analytical functions for that. There are several options, here is one.

    with testdata as (select 41 num from dual union all
                      select 82  num from dual union all
                      select 123 num from dual union all
                      select 164 num from dual union all
                      select 205 num from dual union all
                      select 246 num from dual)
    /* end of test data creation */
        ,resulttab as (select num, nvl(lag(num) over (order by num) ,0) next_num
                       from testdata )
    select num
    from resulttab
    where next_num < 200 ;
    NUM
    ---
    41
    82
    123
    164
    205
    
    ...
    select num
    from resulttab
    where next_num < 164 ;
    41
    82
    123
    164
    
  • Go to the next paragraph shortcut

    Hello

    I could still missing some practice, because I'm a veteran of FrameMaker but a newcomer to FrameMaker Windows. Thus, it might not surprise if I can't find the shortcut to "go to the next paragraph. CTRL-down corresponds to the end of the current paragraph, but then stops there, until I have not to support again. On the contrary, selection by paragraph with Ctrl-Shift-down works fine, just like moving upward with Ctrl-top.

    Am I missing something?

    Paolo

    Paolo,

    You can change the keys ctrl + PgDn function in the file wincmds.cfg as the equivalent of the b p shortcut. You must follow the instructions in the documentation for customizing FrameMaker found here: http://help.adobe.com/en_US/FrameMaker/8.0/customize_frame.pdf

    The sequence of p b is defined as such:


       

    Change the keys ctrl + PgDn function to have the same definition.

    Make backups of the .cfg file before you start to play with them.

  • Get the parent (paragraph) of the text

    Hi all

    I met a problem and can't seem to find the solution myself. It's like this:

    Let's say you have a story with two paragraphs. A paragraph has 'Hello' in it and the other a 'world' in as text.

    You can select e.g. 'Hello', then click on a button, and then after clicking on the button change for example "Hello".

    So you have a paragraph with "Greetings" and the other with the "world".

    Now, I have the following code I need to change:

    selectedContent var = app.selection [0] .silence; It's selection, "Hello".

    var contentToChange = app.selection [0] .parent; This is the story.

    I want to contentToChange be the paragraph in the text.

    .parent Gets the story, so everything disappears and becomes just "Hello".

    Tried a lot of things, but impossible to find the solution (what should I use instead of 'parent' to get the paragraph).

    Can anyone help please, thank you in advance

    Greetings

    contentToChange = app.selection [0] .paragraphs [0]

    is what you are looking for

  • Can not get the next photo, after deletion, the usual way

    Hello

    I've recently updated to Lightroom 5 CC of Lightroom.

    I have this annoying bug: when I delete an image in "Develop" mode I get the previous edited image (which is OK).

    Now try to achieve the following by using the right arrow key gives nothing! In fact, the two arrows, next photo (right) and previous image (left) do not work.

    I found a way to restore the operation keys by enlarging the current image (simply click the left button of the mouse on the photo) and return to the normal size. But it's boring set the action of the direction keys on this way.

    Is this a known bug?

    Thank you

    Alon

    In my 6 Lightroom (and all previous versions of Lightroom for as long as I can remember) on Windows 10 in Module Development to go left, you use Ctrl + left arrow and go right, you use Ctrl + right arrow. (On a Mac, this is the Cmd + arrow left and right arrow keys Cmd)

  • Get the next Navigation control in the APEX

    How can I change the navigation of the registration file to use another clue outside the primary key? Under "Get Next or Previous primary key value ', APEX lists the Navigation order, and the secondary Navigation order.» I put here my secondary index value? I do not wish to use the primary key, which in my case is only a sequence number (SEQ_ID). I need to use the results of a series of data more closely one such Invoice_Number. Any suggestions?

    Hello
    I think there is a misunderstanding here. The primary key declared in the process of 'Get next or previous primary Key Value' is just used to get the line (in fact, it doesn't have to be a primary will be the keys, all unique). Real for "next" and "previous" navigation uses the column "Navigation order. So use your primary key to get the lines, set the order of Navigation to invoice_number, and if the lines need filtering, then use the "optional WHERE clause. For example, if you have linked to the line in a report, and then use the same WHERE clause as the report. Note that a form element has no connection to the result set of a report.

    I hope this helps.

    Best regards, Garry

  • an analytic function can be used to get the next largest value?

    I have a table with the values as follows:

    ID term val
    1 200720 aaa
    1 200720 bbb
    1 200720 ccc
    1 201220 ddd
    1 201220 eee

    2 200720 qqq
    2 200720 rrr
    2 200920 sss

    What I need, is to get the value of the next higher period (999999 if not exist) for each id line, like this:

    ID term val next_term
    1 200720 aaa 201220
    1 200720 bbb 201220
    1 200720 ccc 201220
    1 201220 ddd 999999
    1 eee 201220 999999

    2 200720 qqq 200920
    2 200720 rrr 200920
    2 200920 sss 999999

    I tried lead futures partitiion by id, but that just gives me the value in the next line. I watched windowing, but my eyes crossed. Any ideas? I need the next highest value not the value in the next line. The value of next_term must never be identical to the value term

    CREATE TABLE WJPTEST
    (
    ID VARCHAR2 (3 CHAR),
    VARCHAR2 (6 CHAR) TERM,
    VAL VARCHAR2 (3 CHAR)
    )
    ;

    Insert into WJPTEST
    (ID, VAL)
    Values
    ('1', '200720', 'aaa');
    Insert into WJPTEST
    (ID, VAL)
    Values
    ('1', '200720', 'bbb');
    Insert into WJPTEST
    (ID, VAL)
    Values
    ('1', '200720', 'ccc');
    Insert into WJPTEST
    (ID, VAL)
    Values
    ('1', ' 201220 ","ddd");
    Insert into WJPTEST
    (ID, VAL)
    Values
    ('1', ' 201220 ","eee");
    Insert into WJPTEST
    (ID, VAL)
    Values
    ('2', '200720', 'qqq');
    Insert into WJPTEST
    (ID, VAL)
    Values
    ('2', '200720', 'rrr');
    Insert into WJPTEST
    (ID, VAL)
    Values
    ('2', '200920', 'sss');
    COMMIT;

    Published by: wjpenfold on 12 June 2012 10:08

    wjpenfold wrote:
    what I want is the next largest value that may never be the same value as the current line. I'm working on getting the code example.

    What are the increments of TEMP? Assuming that the TERM cannot grow less than 1:

    NVL (Lead (term) OVER (PARTITION BY id ORDER BY term RANK BETWEEN 1 NEXT AND UNBOUNDED FOLLOWING), 999999)

    For example:

    select  sal,
            NVL(FIRST_VALUE(sal) OVER (ORDER BY sal RANGE BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING),999999) lead_sal
      from  emp
      order by sal
    /
    
           SAL   LEAD_SAL
    ---------- ----------
           800        950
           950       1100
          1100       1250
          1250       1300
          1250       1300
          1300       1500
          1500       1600
          1600       2450
    
           SAL   LEAD_SAL
    ---------- ----------
          2450       2850
          2850       2975
          2975       3000
          3000       5000
          3000       5000
          5000     999999
    
    14 rows selected.
    
    SQL>  
    

    SY.

  • How to get the current paragraph?

    I now TLF XML:

    private var text: XML =

    " < flow: TextFlow fontSize ="20"paddingRight ="50"paddingBottom = paddingTop"50"="50"paddingLeft ="50"whiteSpaceCollapse = 'preserve' xmlns:flow = ' http://ns.Adobe.com/TextLayout/2008 ">
    < stream: p >
    < flow: span > Hallo Programmili... to the tust Schön langsam meinem koepchen weh liebers < / flow: span >
    < / flow: p >

    < / flow: TextFlow >;

    I try to get the paragraph to a selection within the text to help suite methods:

    var int index = tf.interactionManager.anchorPosition; I have 29 here
    var child: element FlowElement = tf.getChildAtIndex (index); undefined - it should be the element flowElement that contains the text... < span: flow > < / flow: span >
    var para: ParagraphElement = test.getParagraph (); undefined - it should be subsection

    I really started to appreciate the new framework... but now I'm getting really crazy

    Everyone can imagine what I'm doing wrong? The undefined itself makes me suspicious... he should not be null?

    Help would be much appreciated!

    You are confused index and position.

    What you want is:

    var int position = tf.interactionManager.anchorPosition;     It is a position not a clue

    var sheet: FlowLeafElement = tf.findLeaf (position);     map a location on a sheet

    var para: ParagraphElement = leaf.getParagraph ();     find the element leaf to own paragraph

    Also consider whether you want the anchorPosition or the activePosition.  In a selection of points, they are the same.  In a block selection, the anchor is where the block began and the asset is the end changed the user interface (by dragging the mouse and keys).

    Hope that helps,

    RIchard

  • When changing the windows, how can I get the next window full screen?

    I double click on my ebay icon, it opens in a window that is minamised. How can I configure it to mount the best?

    Try this:

    Open it shortcut-> close all other windows internet Explorer-> drag the edges of the window to fill the entire screen-> close the window by holding the 'alt' key and clicking on the button close at the top right of the window (red with white "x" button), the next time that you open, you should remember its size when it was closed.

    I hope I could help

  • request to get the next date which is not a public holiday

    Hello world

    I need help for a query.  consider the following data

    holiday

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

    SELECT To_Date('12/28/2015','mm/dd/yyyy') double holiday

    UNION ALL

    SELECT To_Date('12/25/2015','mm/dd/yyyy') double holiday

    UNION ALL

    SELECT To_Date('08/31/2015','mm/dd/yyyy') double holiday

    UNION ALL

    SELECT To_Date('05/25/2015','mm/dd/yyyy') double holiday

    UNION ALL

    SELECT To_Date('05/04/2015','mm/dd/yyyy') double holiday

    curr_DATE

    -----------

    SELECT To_Date('12/25/2015','mm/dd/yyyy') double holiday

    UNION ALL

    SELECT To_Date('12/24/2015','mm/dd/yyyy') double holiday

    UNION ALL

    SELECT To_Date('12/23/2015','mm/dd/yyyy') double holiday

    data of curr_date are the main table.  given a date, I want to join the vacation and the date of the Curr so that the result will be a date that is not a holiday.  for example, what gives 28 Dec.  the next available in curr_date < 28 dec date is dec 25. However, dec25th is a holiday on the guest table if the output should be dec 24.

    Another example is the following: given dec 25 date, the previous date, unless that Dec. 25 is dec 24th dec 24 is not in the host table output should therefore be dec 24.

    Another example: I'll add another line to the curr_date table. If the data will look like this

    curr_DATE

    -----------

    SELECT To_Date('12/28/2015','mm/dd/yyyy') double holiday

    UNION ALL

    SELECT To_Date('12/25/2015','mm/dd/yyyy') double holiday

    UNION ALL

    SELECT To_Date('12/24/2015','mm/dd/yyyy') double holiday

    UNION ALL

    SELECT To_Date('12/23/2015','mm/dd/yyyy') double holiday

    given dec 29, the next available in curr_date date is less than 29 dec 28 dec. However, dec28th is holiday in the host table. the next available date is dec 25 in curr_date, but once again dec25 in the host table.  the next available date is 24, but this date is not in the host table output should therefore be 24/12/2015.

    So basically I want to do this in the query by joining the two tables.  can anyone help? pl/sql is ok if it cannot be done using quries.

    Hello

    If you want to use a join, here's one way:

    SELECT MAX (c.holiday) AS last_non_holiday

    OF curr_date c

    LEFT OUTER JOIN holiday h ON h.holiday = c.holiday

    WHERE c.holiday< to_date="" (:cutoff_date,="">

    AND h.holiday IS NULL

    ;

  • GET THE NEXT STOP OF THE TRAIN FROM A MANAGED BEAN (JDEVELOPER AND ADF).

    Hello.

    I have a train that works perfectly with the buttom train Assistant; but when I try to create a custom button to the next train stop to skip a prompt to alert of error:

    "java.lang.NullPointerException ".

    "ADF_FACES-60097: SERVER SO THAT PPR, #2 EXCEPTION"


    The managed code of the action of the bean is:


    public String cb1_action() {}

    Add the code in the event here...

                         

    ControllerContext controllerContext = ControllerContext.getInstance ();

    ViewPortContext currentViewPortCtx = controllerContext.getCurrentViewPort ();

    TaskFlowContext taskFlowCtx = currentViewPortCtx.getTaskFlowContext ();

    TaskFlowTrainModel trainModel = taskFlowCtx.getTaskFlowTrainModel ();

    TaskFlowTrainStopModel currentStop = trainModel.getCurrentStop ();

    trainModel.getNextStop (currentStop);

    Returns a null value.

    }

    Best regards.

    Your use case is described in this blog http://www.oracle.com/technetwork/developer-tools/adf/learnmore/82-programmatically-navigate-trains-396873.pdf

    Timo

  • function/SQL to get the next weekend date of SUNDAY, in light of the current sysdate

    Hi all

    someone at - it a reliable piece of SQL or the function that takes the current SYSDATE as a parameter and returns the next date available weekend (SUNDAY)

    So for example if it is adopted as of today 01/07/2009 (Wednesday) it returns data 07/05/2009, which is the Date of Sunday following.

    Even if I went to Sunday 07/05/2009, it would go back the date 07/12/2009, which is this Sunday.

    Any help in advance apppreciated!

    Kind regards
    Satnam
    select next_day(sysdate, 'SUNDAY') from dual
    

    Good luck

Maybe you are looking for

  • How is done since the upgrade to Windows 10 I can not blockers advertising at work?

    I had Avast Antivirus navigation secure, Ad Block Plus, Ad Block Plus Pop Up Addon, blocker of advertising from Facebook and Webmail Ad Blocker all installed and working great on a customers laptop, but after they have upgraded to Windows 10 all the

  • import messages in OE6 problem

    I can't import messages/issues of identity. I lost some files/folders this morning (don't know not how they were deleted, I think that the now missing folder has been selected by mistake and pulled to another folder of Outlook Express existing) so I'

  • EA4500: Full reset/clear/clean all applications and references of cloud

    I'm back my EA4500 and would like to know how to clear the router and remove all access of the Cloud. I have install the 'cloud' all in troubleshhooting a question and I now want to erase this and everything related to the router of my systems. Note:

  • iPhone vpn client stopped working

    I have a 5510 ASA and we use customer Cisco vpn on the iPhone 3G for 2 years.  Two weeks ago, we had a consultant put in place a failover site to site on our ASAs VPN.  This day here of iPhone VPN client has stopped working on all iPhones.  The VPN c

  • Block of detail automatically updated when the form is saved

    HelloI have a form with 2 blocks of tabular data (1 master and 1 retail).The retail block also contains a non-base of data element, a checkbox control. User can check or uncheck this box for each record in the detail block.My problem is, when the use