Find the rule and insert content

Hi all

I need to find the rule in race 1 and the color is "MM".

Once I found the rule, need to replace the rule with the content "aaa".

Try the code below is:

var myPg = app.activeDocument.allPageItems;

for(i=myPg.length-1; i>=0; i--)
{
//~     if(myPg[i].constructor.name == "GraphicsLine")
//~     {
        
        if(myPg[i].strokeWeight == 1 && myPg[i].strokeColor.name == "MM")
        {
            myPg[i].remove();
            myPg[i].insertionPoints[0].contents = "aaa"      //Error in this line
            }
//~         }
    }


Please see the attachment for more reference.

rule.png

Please help for my application.

Concerning

Siraj

What is "aaa"?
A string not put formatted text?
It must be formatted?

If you want just the new content without special formatting you could view the graphicLine found as a mere object of character with graphicLine.parent. The parent of a graphic object inside a text object is a single character.

Now, you can assign a new content to this parent:

myGraphicLinesInStories[n].parent.getElements()[0].contents = "aaa";

Of course, if you do something like that, it takes a loop back to just not to spoil the index.

Uwe

Tags: InDesign

Similar Questions

  • To find the months and days between 2 dates

    Hello

    I want to find the months and days between 2 dates.

    For example.

    1 - Date: August 25, 2013

    2 - Date: October 23, 2013

    If we consider each month 30 days, it should give

    August 25, 2013 to August 30, 2013 = 6 days

    01-Sep-2013-30-Sep-2013 = 1 month

    October 23, 2013 to October 30, 2013 = 8 days

    Total = 1 month and 14 days.

    Kindly help as soon as possible.

    Thanks and greetings

    Suresh

    Assuming that d2 > d1,.

    where d)

    Select sysdate d1, sysdate + 56 double d2

    Union all select to_date (March 1, 2013 ',' dd-mon-yyyy "") d1, to_date (March 31, 2013 ',' dd-mon-yyyy ') d2 double

    Union all select to_date (5 February 2013 ',' dd-mon-yyyy ') d1, to_date (March 31, 2013 ',' dd-mon-yyyy "") double d2

    Union all select to_date (February 25, 2013 ',' dd-mon-yyyy "") d1, to_date (March 23, 2013 ',' dd-mon-yyyy ') d2 double

    Union all select to_date (February 25, 2013 ',' dd-mon-yyyy ') d1, to_date (March 31, 2013 ',' dd-mon-yyyy "") double d2

    Union all select to_date (August 2, 2013 ',' dd-mon-yyyy "") d1, to_date (29 October 2013 ',' dd-mon-yyyy ') d2 double

    Union all select to_date (February 1, 2013 ',' dd-mon-yyyy "") d1, to_date (May 31, 2013 ',' dd-mon-yyyy ') d2 double

    Union all select to_date (25 August 2013 ',' dd-mon-yyyy "") d1, to_date ('03-Sep-2013', 'Mon-dd-yyyy') d2 double

    Union all select to_date (July 30, 2013 ',' dd-mon-yyyy "") d1, to_date (August 31, 2013 ',' dd-mon-yyyy ') d2 double

    Union all select to_date (July 31, 2013 ',' dd-mon-yyyy ') d1, to_date (August 30, 2013 ',' dd-mon-yyyy "") double d2

    Union all select to_date (July 31, 2013 ',' dd-mon-yyyy ') d1, to_date (3 August 2013 ',' dd-mon-yyyy "") double d2

    Union all select to_date (3 July 2013 ',' dd-mon-yyyy "") d1, to_date (August 31, 2013 ',' dd-mon-yyyy ') d2 double

    Union all select to_date ('31-08-2013', ' dd-mm-yyyy'), to_date('05-10-2013','dd-mm-yyyy') of the double

    Union all select to_date ('05-02-2013', ' dd-mm-yyyy'), to_date('31-03-2013','dd-mm-yyyy') of the double

    Union all select to_date ('05-02-2013', ' dd-mm-yyyy'), to_date('05-03-2013','dd-mm-yyyy') of the double

    Union all select to_date ('05-02-2013', ' dd-mm-yyyy'), to_date('05-02-2013','dd-mm-yyyy') of the double

    )

    Select d1, d2,

    1 + 30 * trunc (months_between (d2, d1)) + LESS (extract (day of d2), 30)-LESS (excerpt (d1 day), 30)

    + CASE when extracted (d2 day)< extract(day="" from="" d1)="" then="" 30="" else="" 0="" end ="">

    d

    D1 D2 DAYSBETWEEN

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

    October 10, 2013 5 December 2013 56

    March 1, 2013 30 March 31, 2013

    5 February 2013 March 31, 2013 56

    February 25, 2013 March 23, 2013 29

    February 25, 2013 March 31, 2013 36

    August 2, 2013 29 October 2013 88

    February 1, 2013 may 31, 2013 120

    August 25, 2013 03 - Sep-2013 9

    July 30, 2013 31 August 31, 2013

    July 31, 2013 August 30, 2013 31

    July 31, 2013 3 August 2013 4

    July 3, 2013 August 31, 2013 58

    31 August 2013 5 October 2013 36

    5 February 2013 March 31, 2013 56

    5 February 2013 March 5, 2013 31

    February 5, 2013 February 5, 2013 1

    In my view, which corresponds to your rules.

  • Could not find the rule of reconciliation

    Hi all

    I could not find the rule of reconciliation I created via OIM Design console!  The result is no query to match!


    Yes. go to the console design-> developer tools - > rules of reconciliation-> name of the object Type or the name of the rule and click on search.

  • Toshiba 40TL938G - find the date and time settings

    I have a 40TL938G and I can't find the date and time settings.
    Can someone help me?

    SSY
    I read the manual and it does ' t say anything about these settings.

    THX

    In the settings of digital television, you should see the option called local time settings

    To display the time on the TV you press the sign of the small clock on the remote control while watching a normal TV show (analog only)

  • Find the Center and angle

    Hello. I have two markers. It is stationary and the other is moving (app.jpg). How can I find the centers and angles shown in picture (app.jpg)?


  • How to find the utilities and windows drivers VGN-CR36G 8?

    Hello

    I use laptop Vaio VGN-CR36G with vista ultimate. Now, I want to install windows 8 enterprise edition.

    But I can't find the drivers and utilities on the site of sony vaio.

    But my product is compatible for windows 8 OS.

    Here is the link below:

    http://www.Sony-Asia.com/support/product/VGN-CR36G

    Can someone please help me to download all drivers and software?

    Thank you

    Hi Whiteeasy.

    This model does not support Windows 8 operating system which you can confirm from the link below.

    http://www.Sony-Asia.com/microsite/VAIO/support/GetWindows8/GetWindows8_EN_NA.html?referer=http%3A%2...

    If my post answered your question, please mark it as an "accepted Solution".

  • How to find the Maxima and Minima for each column of a 2D array?

    Hello

    I have a 2D chart and I would find the maxima and minima of each column of the 2-D table. Even though I know how to get maxima and minima for the whole picture but don't know how columnwise? Any ideas please?

    Thank you

    Rohit

    Hello

    @Smercurio-What you said is true, I should have shown using automatic indexing enabled which is really excellent choice. I just tried to show in a very simple way.

    Anyway, here's the best way

  • How to find the maximum and minimum of a waveform between cursors

    Hello!

    Does anyone know an easy way to find the maximum and minimum of a waveform between two sliders?

    Kind regards

    Andreas

    Hi Andreas,

    attached, you get an example of it in MeasurementStudio.

  • Cocomputer cannot find the printer and I do not have a disk for it

    Original title: printer SUPPORT

    my computer cannot find the printer and I do not have a disk for it

    Then, download and install the appropriate drivers on the printer manufacturer's support web site.

  • I have a U135 DX netbook with a built-in webcam. How can I find the cam and I press these keys for easy access

    I have a U135 DX netbook with a built-in webcam. How can I find the cam and I press those keys for easier access please PS I'm not a manual.

    You can get a manual here.

    http://www.msi.com/product/NB/U135DX.HTML#/?DIV=manual

  • Difference in performance between the CTA and INSERT / * + APPEND * / IN

    Hi all

    I have a question about the ETG and "Insert / * + Append * / Into" statements.

    Suite deal, I have a question that I did not understand the difference in operating times EXADATA.

    The two tables of selection (g02_f01 and g02_f02) have not any partition. But I could partition tables with the method of partition by column "ip_id" hash and I tried to run the same query with partition tables. Change anything in execution times.

    I executed plan gather statistics for all tables. The two paintings were 13.176.888 records. The two arrays have same "ip_id' unique columns. I want to combine these tables into a single table.

    First request:

    Insert / * + append parallel (a, 16) * / in dg.tiz_irdm_g02_cc one

    (ip_id, process_date,...)

    Select / * + parallel (a, 16) parallel (16B) * / *.

    tgarstg.tst_irdm_g02_f01 a.,

    tgarstg.tst_irdm_g02_f02 b

    where a.ip_id = b.ip_id


    Elapsed = > 45: 00 minutes


    Second request:

    create table dg.tiz_irdm_g02_cc nologging parallel 16 compress for than query

    Select / * + parallel (a, 16) (b, 16) parallel * / *.

    tgarstg.tst_irdm_g02_f01 a.,

    tgarstg.tst_irdm_g02_f02 b

    where a.ip_id = b.ip_id

    Elapsed = > 04:00 minutes


    Execution plans are:


    1. Enter the statement execution Plan:

    Hash value of plan: 3814019933

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

    | ID | Operation | Name | Lines | Bytes | TempSpc | Cost (% CPU). Time |    TQ | IN-OUT | PQ Distrib.

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

    |   0 | INSERT STATEMENT.                  |    13 M |    36G |       |   127K (1) | 00:00:05 |        |      |            |

    |   1.  LOAD SELECT ACE | TIZ_IRDM_G02_CC |       |       |       |            |          |        |      |            |

    |   2.   COORDINATOR OF PX |                  |       |       |       |            |          |        |      |            |

    |   5:    PX SEND QC (RANDOM). : TQ10002 |    13 M |    36G |       |   127K (1) | 00:00:05 |  Q1, 02 | P > S | QC (RAND) |

    |*  4 |     IN THE BUFFER HASH JOIN |                  |    13 M |    36G |   921 M |   127K (1) | 00:00:05 |  Q1, 02 | SVCP |            |

    |   3:      RECEIVE PX |                  |    13 M |    14G |       |  5732 (5) | 00:00:01 |  Q1, 02 | SVCP |            |

    |   6.       PX SEND HASH | : TQ10000 |    13 M |    14G |       |  5732 (5) | 00:00:01 |  Q1 00 | P > P | HASH |

    |   7.        ITERATOR BLOCK PX |                  |    13 M |    14G |       |  5732 (5) | 00:00:01 |  Q1 00 | ISSUE |            |

    |   8.         STORE TABLE FULL ACCESS | TST_IRDM_G02_F02 |    13 M |    14G |       |  5732 (5) | 00:00:01 |  Q1 00 | SVCP |            |

    |   9.      RECEIVE PX |                  |    13 M |    21G |       | 18353 (3) | 00:00:01 |  Q1, 02 | SVCP |            |

    |  10.       PX SEND HASH | : TQ10001 |    13 M |    21G |       | 18353 (3) | 00:00:01 |  Q1, 01 | P > P | HASH |

    |  11.        ITERATOR BLOCK PX |                  |    13 M |    21G |       | 18353 (3) | 00:00:01 |  Q1, 01 | ISSUE |            |

    |  12.         STORE TABLE FULL ACCESS | TST_IRDM_G02_F01 |    13 M |    21G |       | 18353 (3) | 00:00:01 |  Q1, 01 | SVCP |            |

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

    Information of predicates (identified by the operation identity card):

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

    4 - access("AIRDM_G02_F01".") IP_ID '= 'AIRDM_G02_F02'.' IP_ID")

    2 - DEC execution Plan:

    Hash value of plan: 3613570869

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

    | ID | Operation | Name | Lines | Bytes | TempSpc | Cost (% CPU). Time |    TQ | IN-OUT | PQ Distrib.

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

    |   0 | CREATE TABLE STATEMENT.                  |    13 M |    36G |       |   397K (1) | 00:00:14 |        |      |            |

    |   1.  COORDINATOR OF PX |                  |       |       |       |            |          |        |      |            |

    |   2.   PX SEND QC (RANDOM). : TQ10002 |    13 M |    36G |       |   255K (1) | 00:00:09 |  Q1, 02 | P > S | QC (RAND) |

    |   3.    LOAD SELECT ACE | TIZ_IRDM_G02_CC |       |       |       |            |          |  Q1, 02 | SVCP |            |

    |*  4 |     HASH JOIN |                  |    13 M |    36G |  1842M |   255K (1) | 00:00:09 |  Q1, 02 | SVCP |            |

    |   5.      RECEIVE PX |                  |    13 M |    14G |       | 11465 (5) | 00:00:01 |  Q1, 02 | SVCP |            |

    |   6.       PX SEND HASH | : TQ10000 |    13 M |    14G |       | 11465 (5) | 00:00:01 |  Q1 00 | P > P | HASH |

    |   7.        ITERATOR BLOCK PX |                  |    13 M |    14G |       | 11465 (5) | 00:00:01 |  Q1 00 | ISSUE |            |

    |   8.         STORE TABLE FULL ACCESS | TST_IRDM_G02_F02 |    13 M |    14G |       | 11465 (5) | 00:00:01 |  Q1 00 | SVCP |            |

    |   9.      RECEIVE PX |                  |    13 M |    21G |       | 36706 (3) | 00:00:02 |  Q1, 02 | SVCP |            |

    |  10.       PX SEND HASH | : TQ10001 |    13 M |    21G |       | 36706 (3) | 00:00:02 |  Q1, 01 | P > P | HASH |

    |  11.        ITERATOR BLOCK PX |                  |    13 M |    21G |       | 36706 (3) | 00:00:02 |  Q1, 01 | ISSUE |            |

    |  12.         STORE TABLE FULL ACCESS | TST_IRDM_G02_F01 |    13 M |    21G |       | 36706 (3) | 00:00:02 |  Q1, 01 | SVCP |            |

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

    Information of predicates (identified by the operation identity card):

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

    4 - access("AIRDM_G02_F01".") IP_ID '= 'AIRDM_G02_F02'.' IP_ID")

    Oracle version:

    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production

    PL/SQL Release 11.2.0.4.0 - Production

    CORE Production 11.2.0.4.0

    AMT for Linux: Version 11.2.0.4.0 - Production

    NLSRTL Version 11.2.0.4.0 - Production

    Notice how this additional distribution has disappeared from the non-partitioned table.

    I think that with the partitioned table that oracle has tried to balance the number of slaves against the number of scores he expected to use and decided to distribute the data to get a 'fair sharing' workload, but had not authorized for the side effects of the buffer hash join which was to appear and extra messaging for distribution.

    You could try the indicator pq_distribute() for the insert to tell Oracle that he should not disrtibute like that. for example, based on your original code:

    Insert / * + append pq_distribute parallel (a, 16) (a zero) * / in dg.tiz_irdm_g02_cc one...

    This can give you the performance you want with the partitioned table, but check what it does to the space allocation that it can introduce a large number (16) of extensions by segment that are not completely filled and therefore be rather waste of space.

    Concerning

    Jonathan Lewis

  • Read the BLOB and insert data into a table

    Hi all

    Let us examine below on Oracle DB 12 c:

    create table xx_test3 (c blob);
    
    insert into xx_test3 (c) values (utl_raw.cast_to_raw(
    'azertyuiop,qsdfghjklm,wxcvbn'));
    
    
    create table xx_target (col1 varchar2(50));
    
    
    
    

    Can someone guide me how to read the data and insert it into the xx_target table?

    Necessary result is:

    
    select * from xx_target;
    
    
    COL1                                              
    
    --------------------------------------------------
    azertyuiop                                        
    qsdfghjklm                                        
    wxcvbn                                            
    
    3 rows selected.
    
    
    
    
    

    Thanks in advance,

    Stoyanov.

    insert into xx_target (col1)

    with the data as)

    Select utl_raw.cast_to_varchar2 (dbms_lob.substr (c, 32000, 1)) CBC

    of xx_test3

    )

    Select regexp_substr (CBC, ' [^,] +', 1, level)

    from the data

    connect by level<= regexp_count(src,="" ',')="" +="">

  • Query to find the Pages and the list of permissions associated with a particular role in PS

    I want a query to find the Pages and the list of permissions associated with specific roles in PS.

    For example, if we see the role of manager accounts payable, it conatins Pages and the list of permissions.

    But, to get everything in EXCEL sheet by Manuel priocess's BIG job. So, can someone give me the query.

    Please try under queries

    The roles assigned to the list of Perm:

    SELECT B.ROLENAME

    OF PSCLASSDEFN A, PSROLECLASS B

    WHERE (A.CLASSID = B.CLASSID

    AND A.CLASSID =: 1).

    List of Perm pages can access:

    SELECT B.MENUNAME, B.BARNAME, B.BARITEMNAME, B.PNLITEMNAME, C.PAGEACCESSDESCR, B.DISPLAYONLY

    OF PSCLASSDEFN A, PSAUTHITEM B, PSPGEACCESSDESC C

    WHERE (A.CLASSID = B.CLASSID

    AND A.CLASSID =: 1

    AND B.BARITEMNAME > ' '

    AND B.AUTHORIZEDACTIONS = C.AUTHORIZEDACTIONS)

  • Where can I find the vertical and horizontal spaces of you or margins on CC Version?.

    Where can I find the vertical and horizontal spaces of you or margins on the CC Version? I need to leave a few spaces pixels around an image, but I can't find it on this new version.

    Thanks in advance

    In the CSS designer under window > CSS designer or SHIFT + F11

    Choose the item that you are working with and press on the + in the selectors of section

    Then in the Properties section, make sure that the first tab is selected (Layout) and scroll down to the margin

    Set it to a number of pixels that you want (for example, 10px)

  • I posted a question can not find the question and or response. Help, please

    I posted a question can not find the question and or response. Help, please

    AFAIK, you can't share a catalog like this.

    The only recommended method is to store your images and catalogue on an external drive, you can alternatively plug in both computers.

    With today the external USB drives, the speed is still correct, and many users are satisfied with this solution.

Maybe you are looking for

  • Smart touch laptop: reset bios password for 15 touchscreen smart (cnd4422hxx)

    You try to reset the bios password but I could not. No idea what is the code for this?reset password bios for 15 touchscreen smart (cnd4422hxx)Thank you

  • Satego X 200-21 L - 3 beeps at startup

    Hello first of all, sorry, my English is not very good, but I can't find a German forum. I hope you understand what I want :-) Here, I have the laptop (subject) and when I try to start it, there is nothing on the screen. Black. Only 3 beeps. Am I jus

  • want to dv6: Recovery manager

    Hello... I want to install a new OS (linux) on my laptop and I have not yet made the recovery disc After the installation of the new operating system, I can do recovery by the recovery disk by default on my HDD without disks? in the case where the re

  • Error Msg: syncing iPhone new 6 + requires a newer version of iTunes

    I have a desktop Mac OS Mac. 10.7.5 X.  and iTunes version 12.2.2.  I get an error message that I need the most recent version of iTunes.  I do an update for iTunes and it says I have the latest version.  Still, I can't sync my iPhone error message b

  • How to fix runtime error when you open a folder in windows xp

    I HAVE WINDOWS XP AND IE 8. HAPPENS EVERY TIME I OPEN A FOLDER OR AN IE BROWSER. SOME RUNTIME ERROR CODES ARE: RUNTIME ERROR 216 AT 004AD768, RUNTIME ERROR 216 AT 004ED768, RUNTIME ERROR 216 AT 009BD768. They vary, but they are basically runtime erro