Select texts based on the option "customer tracking/kerning.

Hi all

If it is possible to push all the texts of tracking/kerning table? If it is possible to attack with highlighting of text as shown below?

Screen shot 2015-05-05 at 5.11.34 PM.png

Screen shot 2015-05-05 at 5.12.36 PM.png

So I put together a few lines.

Try them and tell me if it points in the right direction.

To use the Script, you need an InDesign file with text. Some characters have kerning (-100). On top, you need a character style in the InDesign document with the name of "red". If you change the color in the character style, you should see that the characters with kerning (-100) have given color after you run the script.

Kind regards

Daniel (from Switzerland)

main();
exit();

function main() {

    // if there is an open document in InDesign
    if (app.documents.length > 0) {
        var myDoc = app.activeDocument;

        // get the selected text
        var mySel = myDoc.selection[0];

        if ((mySel != null) && (mySel.constructor.name == "Text")) {

            // create an array
            var charArray = new Array();
            alert("information \nText selected");

            alert("Information\n# characters selected: " + mySel.characters.length);

            for (var i = 0; i < mySel.characters.length; i++) {
                var myChar = mySel.characters[i];

                // if the kerning was changed
                if (myChar.kerningMethod == "Manual") {

                    // output to the console
                    $.write("Character: >" + myChar.contents + "< kerning: " + myChar.kerningValue);

                    // if the kerning is -100 or  less
                    if (myChar.kerningValue < -99) {

                        // apply characterstyle to found characters no array needed
                        myChar.appliedCharacterStyle = myDoc.characterStyles.item("red");
                        $.writeln(" OK got it");

                        // push character into array
                        charArray.push(myChar);
                    }
                    else $.writeln();
                }
            }
            alert("Information\nCharacters with kernig -199 found: " + charArray.length);
        }
        else alert("Warning\nNoting or no text selected");
    }
    else alert("Warning\nno document open");

    alert("Information\nI did my job, what about yours?");
}

Tags: InDesign

Similar Questions

  • Select data based on the priority of the State

    ID PRO_ID PRO_OBJ_ID TASK_ID DEVELOPER_ID STATUS
    121243 4940 37506 5250 6532 REJECTED
    122063 4940 37506 5250 6532 RELATIVES
    138306 4940 37506 5250 6532 ACCEPTED
    138307 4940 37506 5250 6532 WIP




    Hello

    In the table above, I need to select data based on the State, a status which precedes CLOSE or ACCEPTED it should display all status any State which is after CLOSE or ACCEPTED, we do not consider.


    In the scenioro above, it should display only the status of first three. After having ACCEPTED, it should not display something


    Please suggest me a request how to write.


    Thank you
    Sudhir.

    Try:

    SQL> with t as (
      2  select 121243 id, 4940 pro_id, 37506 pro_obj_id, 5250 task_id, 6532 developer_id, 'REJECTED' status from dual union all
      3  select 122063, 4940, 37506, 5250, 6532, 'CLOSE' from dual union all
      4  select 138306, 4940, 37506, 5250, 6532, 'ACCEPTED' from dual union all
      5  select 138307, 4940, 37506, 5250, 6532, 'WIP' from dual union all
      6  select 138308, 4940, 37506, 5250, 6532, 'ACCEPTED' from dual union all
      7  select 138309, 4940, 37506, 5250, 6532, 'REJECTED' from dual union all
      8  select 121243, 4940, 37777, 5250, 6532, 'REJECTED' from dual union all
      9  select 122063, 4940, 37777, 5250, 6532, 'CLOSE' from dual union all
     10  select 138306, 4940, 37777, 5250, 6532, 'ACCEPTED' from dual union all
     11  select 138307, 4940, 37777, 5250, 6532, 'WIP' from dual union all
     12  select 138308, 4940, 37777, 5250, 6532, 'ACCEPTED' from dual union all
     13  select 138309, 4940, 37777, 5250, 6532, 'WIP' from dual
     14  ) -- actual query starts here:
     15  select t1.id
     16  ,      t1.pro_id
     17  ,      t1.pro_obj_id
     18  ,      t1.task_id
     19  ,      t1.developer_id
     20  ,      t1.status
     21  from   t t1
     22  where id <= (select max(id)
     23               from   t t2
     24               where  t2.status in ( 'ACCEPTED', 'CLOSED' )
     25               and    t1.pro_id = t2.pro_id
     26               and    t1.pro_obj_id = t2.pro_obj_id
     27               and    t1.task_id = t2.task_id
     28               and    t1.developer_id = developer_id
     29               );
    
            ID     PRO_ID PRO_OBJ_ID    TASK_ID DEVELOPER_ID STATUS
    ---------- ---------- ---------- ---------- ------------ --------
        121243       4940      37506       5250         6532 REJECTED
        122063       4940      37506       5250         6532 CLOSE
        138306       4940      37506       5250         6532 ACCEPTED
        138307       4940      37506       5250         6532 WIP
        138308       4940      37506       5250         6532 ACCEPTED
        121243       4940      37777       5250         6532 REJECTED
        122063       4940      37777       5250         6532 CLOSE
        138306       4940      37777       5250         6532 ACCEPTED
        138307       4940      37777       5250         6532 WIP
        138308       4940      37777       5250         6532 ACCEPTED
    
    10 rows selected.
    

    If it works then please provide us with some representative sample data again.

  • change the field type selection list of text based on the data in the other domain.

    Hello

    We have a requirement where we are looking to display the page as element select list or a free text field based on the value of the item to another page.

    Say, we have two fields

    Day:

    Products:

    If day = 'Monday' produced a drop in low field of another product would be a free text field.   Is this possible in APEX?

    This is the configuration I did.

    I used the field produced twice (as a text and list field select) as an element of a page., dependent on the value of the day I used the dynamic properties of actions to show/hide these fields.

    However, when I click on submit, it throws an error:

    ORA-06550: line 1, column 108: PL/SQL: ORA-00957: name of column in double ORA-06550: line 1, column 13: PL/SQL: statement ignored


    Kind regards

    Satya

    You can have both share the same database column, the process of the APEX DML does not know how to consolidate.

    You will need to add a calculation and determine the real value based on two fields, up to an only one mapped to db.

  • Passing DB values to the text based on the Select Value box

    Hello

    I'm very big thing back to the Oracle APEX. In my project, I have a requirement in which I need to pass different values for the corresponding text boxes on a different page based on the value I select in the item "Select Value".

    I tried using processes calling for demand, but could not get the desired result.

    Please suggest!

    Hello

    Can you repeat your scenario on apex.oracle.com? It will be easier to fix it this way.

    Kind regards

  • Limit the number of characters in a text based on the first digit field

    Hello and thank you in advance for your help!

    I want to limit the amount of characters in the text field based on the first digit of the number (the text field is limited to a number format... no decimals, no comma).

    For example, if the number starts with a 3, I would limit the text field to allow only ten characters. I have three scenarios but if I could start with code and what is the best place to add (key combination or validation?) I can take it from there. Thanks again for your help!

    I wrote this code for you that does this. Use it as a typo of the custom field code:

    // Validate that only digits are entered
    if (event.change) {
        event.rc = /^\d+$/.test(event.change);
    }
    
    // Validate string length if it starts with 3
    if (/^3/.test(AFMergeChange(event))) {
        event.rc = AFMergeChange(event).length <= 10;
        if (!event.rc) app.alert("If the number starts with \"3\" it may not be longer than 10 digits.",1); // optional error message
    }
    

    You can duplicate the second part of it for additional terms, but keep in mind that this code won't let you even remove the first character in the field if the result is not valid.

    For example, if you enter "234567890123456" then you can't remove the "2" at the beginning because that would result in a number not valid. You can delete all the other numbers, even if and when it is 10 digits or less, then you can remove the departure "2" as well.

  • How can I add Auto text based on the value in the numeric field?

    Need help... I'm trying to add the auto text to a text based on a value in a numeric field. I want my text fields (summary box) to say 'Success' if (box score) value is equal to 10 and say "is not good" If the value is less than 10. My digital field is calculated by selecting drop-down lists.

    Thanks in advance for your help.

    Ed Watson

    Here is a link to the document that I created...

    https://files.Acrobat.com/?TrackingID=KGLIT#folder/c3106c32-2e69-4a5f-8ef2-94d25623dbfb

    Try this:

    If (NumericField1.rawValue< 10)="">

    TextField1.rawValue = "does not."

    }

    else {}

    TextField1.rawValue = "passed."

    }

  • List option Select to return all the options

    Hello

    I created a search form that includes an item called 'AccountType '. This element is a list that is filled by a recordset containing various Types of accounts. The user can select an account type to display data based on their selection. However, I want to include a select option that returns all records of any type of account. List box is...

    < select name = 'AccountType' id = 'AccountType' >
    < option value = "" > all Types of accounts < / option >
    < cfoutput query = "rsAccountType" >
    < option value = "#rsAccountType.AccountTypeId #" > #rsAccountType.AccountType # < / option >
    < / cfoutput >
    < / select >

    Now the "Account Types all the ' option is an empty string, as you can see above that I explored the web and not found the answer. Y at - there some code I can include that make this 'All Types of account' option to return any type of account?

    Appreciate any help!

    Thank you
    Richard

    Answer right under my nose...

    http://www.Adobe.com/cfusion/knowledgebase/index.cfm?id=tn_15746

  • Poller DB to select records based on the timestamp

    Hi all

    I want select records from the coloumn timestamp where the timestamp is older than an hour. Is it possible to do this through poller db? I tried but unable to pass the dynamic value (currently - 1 hr)

    Thanks in advance!

    Eventually create a view based on the timestamp and singled out the dbpoller view.

  • Can the color of the text based on the value

    I searched for a way to change text color based on the value fields

    If Textbox =, then A will be blue

    If Textbox = B, then B will be red

    I just need help get the fi then code work, change of color after it is easy

    Any Suggestions...

    To change the boder, add the following script to the exit event:

    If (TextField1.rawValue is "Desired value")
    TextField1.border.edge.color.value = "255,0,0";
    .
    .

    For the fill color, add the following script to the exit event:

    If (TextField1.rawValue is "Desired value")
    TextField1.border.fill.color.value = "255,0,0";

  • Interactive report, change in color of the text based on the value in another column

    I have a sample report at this url:

    workspace: homeworld

    username: test_report

    password: test_report

    APEX version 4.2.3 database 11 g release 2...

    # Application: 202: IR TEST REPORTS

    Page in question is #2 page

    I have the setup of the report and you must make the following change...

    I have 2 columns: Comm and bonus.

    If the bonus > comm, I need to change the text color of the color of the Red bonus

    If the bonus, comm, I need to change the text color of the bonus in green color

    If the bonus = comm, I need to change the text color of the bonus to black color

    I tried using the code with the select and am NOT wanting that, since he will be delivered with the data when they are downloaded in CSV or Excel... Had thought using the construction by highlighting, but that does not compare one column to another...

    Thought a dynamic action, but not clear on HOW to do this, so any help would be appreciated...

    Thank you

    Tony Miller

    Software LuvMuffin

    Hello

    I think that number with JavaScript conversion may not be good idea because it's difficult manipulating different digital formats.

    Check your example on page 3.

    I have added to the report query

    CASE WHEN COALESCE(bonus,0) > COALESCE(comm,0) THEN
     'red'
    WHEN COALESCE(bonus,0) < COALESCE(comm,0) THEN
     'green'
    WHEN COALESCE(bonus,0) = COALESCE(comm,0) THEN
     '#333333'
    END as fcolor
    

    Then I modify every column Expression HTML to be as

    #EMPNO#
    

    Kind regards
    Jari

  • Select lines based on the State of the same line

    Hello

    I have the following table structure and lines defind here
    http://sqlfiddle.com/#! 3f474/4/3

    I want Select if lines
    PRODUCT_NO
    is null, then I need to select rows that have the IS_PAYABLE = 'Y '. If
    PRODUCT_NO
    is not null
    then IS_PAYABLE will be ' no or IS_PAYABLE will be null.

    For example
    For PRODUCT_REG HPO_FABRIC, a
    PRODUCT_NO
    NULL if I need select this line only, not the other two rows.
    I can do
    select * from SUPPLIER_DETAILS where  IS_PAYABLE='Y'
    , but if there are many records with null or not null PRODUCT_NO

    How can I do this using sql?
    select
      PRODUCT_REG,
      PRODUCT_SUPPLIER_CODE,
      PRODUCT_NO,
      START_DATE,
      END_DATE,
      IS_PAYABLE
    from (
    select
      PRODUCT_REG,
      PRODUCT_SUPPLIER_CODE,
      PRODUCT_NO,
      START_DATE,
      END_DATE,
      IS_PAYABLE,
      row_number() over (partition by product_reg order by decode(is_payable,'Y',1,'N',2,3), product_no nulls first) rn
    from
    SUPPLIER_DETAILS
    )
    where
    rn = 1
    
    PRODUCT_REG     PRODUCT_SUPPLIER_CODE     PRODUCT_NO     START_DATE     END_DATE     IS_PAYABLE
    HPO_FABRIC     JP_008     -      08/01/2001     08/31/2001     Y
    STG_PIL     SJ_090     STG-PILLOWS     01/04/2001     01/31/2001     - 
    

    Published by: chris227 on 17.09.2012 13:30

  • Need to fill out the field of text based on the selection after pressing an event in the OPS

    Dear all,

    I have a requirement as below

    I have a table of tip having a LOV field and I have a button to add a line so that I can add a row more lov field and after I am pressing a button to insert the LOV data into a table, my requirement is in the top of the page that I have text field, I have to fill the selected values of LOV in below format in this area.

    EX:

    Table of the advance:

    Row1:ABC

    Row2: DEF

    In the text field, I need ABC-> DEF in this format after pressing a button, and that the value should insert into the table in this form, please help me on this

    Thnaks

    Hello

    Advanced table: (SEE: SampleAdvnacedVO)

    RowNo ColLovValue

    1 ABC

    DEF 2

    Create an OAMessageTextInputBean (Id - ValueItm) and

    Set Property Render ${oa. RenderVO1.Render} with initial value as a BOOLEAN. FAKE.

    Button: Send

    Create a partial fire Action by clicking on the "submit" button

    Code central:

    Of the PFR:

    {if ("submitClick". Equals (PageContext.GetParameter (EVENT_PARAM)))}

    am.invokeMethod ("executeRenderVO");

    OAViewObject vo = am.findViewObject("SampleAdvnacedVO1");

    Line = vo.getAllRowsInRange ();

    String value = null;

    SampleAdvnacedVORowImpl voRow = null;

    for (int i = 0; i)< row.length;="">

    {

    voRow = rank (SampleAdvnacedVORowImpl) [i];

    value = value + "-->" + voRow.getColLovValue ();

    }

    System.out.println ("values-" + value);

    OAMessageTextInputBean valueItmBean = (OAMessageTextInputBean) webBean.findChildRecursive("ValueItm");

    valueItmBean.setValue (value);

    }

    GOT the Code

    public void executeRenderVO() {}

    OAViewObject vo = getRenderVO1();

    vo.executeQuery ();

    vo.insertRow (vo.createRow ());

    Line OARow = (OARow) vo.first ();

    row.setAttribute ("to make", Boolean.TRUE);

    }

  • fill in the selected field of text based on the value of lov

    Hello
    Depending on the value selected in lov, I want to fill another text field. Here is the code I wrote

    Of the PFR:

    If (PageContext.isLovEvent ())
    {
    String lovInputSourceId = pageContext.getParameter (SOURCE_PARAM);
    If ("lovCategory".equals (lovInputSourceId))
    {
    java.util.Hashtable lovResults = pageContext.getLovResultsFromSession (lovInputSourceId);
    if(lovResults!=null)
    {
    = (String) lovResults.get ("lovCategory"); value string
    amobj.categorycode (value);

    }
    }
    }

    Code AMImpl:


    {} public void categorycode (string code)
    sundryCodeVOImpl vobj = getsundryCodeVO1();
    vobj.setWhereClause ("lookup_code =" + "'" + code + "'" ' ");
    vobj. Reset();
    vobj.executeQuery ();

    String desc = vobj.first ().getAttribute("Description").toString ();
    String attr = vobj.first ().getAttribute("Attribute1").toString ();

    testEOViewImpl vobj1 = gettestEOView1();
    vobj1. GetCurrentRow () .setAttribute ("CodeDescription", DESC);
    vobj1. GetCurrentRow () .setAttribute ("PurchasingCategoryCd", attr);
    vobj1. ExecuteQuery();
    }

    With this code, updates to the code attributes, PurchasingCategoryCd values get inserted in the database table, but they now appear in the text fields when a value is selected in lov.

    Please tell me what is the error that I do.


    Thank you
    Sunny

    Hi sunny

    Going through the thread, it seems that the application of LOV VO has three columns viz A, B and C. You want to put the value of the B column to a text field, if this is the case. Simply create a LOV mapping for column B.

    Also I suggest you take a messagestyledtext for the B field as value comes form LOV himself.

    Thank you
    AJ

  • Fill in the field of text based on the menu drop down.

    Here's the scenario: I have 2 drop-down lists on page 1 (list1, List2). Based on this selection, I want to fill in a text field on page 2 with their values, after clicking on a button to update at the bottom of page 2. I use the button click event, but how can I get the actual values of each drop-down list on the previous page?

    You must give the full path to the objects (i.e. form1. Page1.DDListName.RawValue). look in the view hierarchy to see the structure you want. Conversely, you can place the cursor in the script editor where you want the reference to appear, hold done the key ctrl and move the mouse to the object you wish to reference (it will change into a V). Then click on the mouse and the appropriate for this object reference is displayed in the script editor.

    Paul

  • JavaScript to fill the text based on the drop-down list field

    Hello

    I'm trying to write a javascript script to fill a "Textfield" based on what I select in 'Dropdownlist control' this has on a relationship between them. I tried to integrate the script on the category of 'Change' and the script was the following, but it didn't work. I would be grateful if someone can help me with the correct procedure.

    Thank you

    Vijay

    Form1. #subform [0]. DropDownList2 [0]: change - (JavaScript, both)

    function populateDescription() {}

    if (document.subform [0].) {DropDownList2 [0] .value == "BIH")}

    document.subform [0]. TextField83 [0] .value = "Burn in and PBI history."

            }

    }

    I solved this problem by using a script to switch.

    Please see my previous thread in this regard and Paul example will provide you with the right script for a script to switch.

    http://forums.Adobe.com/thread/479021

    script on the drop-down list as follows

    Switch (this.rawValue) {}

    case "dropchoice1".

    FieldName1.RawValue = 'choice of text here ';

    FieldName2. RawValue = "choice of text here ';

    break;

    case "dropchoice2".

    FieldName1.RawValue = 'choice of text here ';

    FieldName2. RawValue = "choice of text here ';

    break;

    }

    Good luck.

Maybe you are looking for

  • Equium A100 - Infra red connection for mobile phone

    Hello Just, I got my new phone and can't connect my laptop to the phone via an infrared connection. My laptop is the satellite A100-306, phone is Nokia 6275i. Connect via a USB cable, but apparently it is not sold in stores and must be found somewher

  • Failed to format create recovery media

    I am trying to create a recovery media for new R30 - 1GZ and opted for USB Flash memory. Inserted a 16 GB Sandisk Cruzer module and said OK for reformatting. Message appears: "Unable to format the drive Windows" (or words to that effect). The module

  • Madly in small print on apple

    the print is so small that I can spend hours trying to get access to the various

  • Problem of sound with BDV-E770W

    Having a problem playing DVD movies on my new home theater. Trailers, scenes cut, etc. work fine, but in the actual movies the vocal track is muffled and distant. Other DVD, for example the TV series, seems to work well. All other inputs (TV, etc.) w

  • Photosmart HP 6520 cannot connect to the server to use apps on printer

    Last night, I bought the printer, saved, set up with the apps on my phone and Tablet and connected it wireless. When I try using one of the applications on the screen it is written "server connection error:-1 there was a problem connecting to the ser