How to highlight the value of tracking in java script

Dear friends


I learn InDesign scripting.  I have very little experience. I want your help.

I want to highlight for any value of letter spacing in above + 15 and -15 in Indesign (Cs6) files.


Thank you

Karthik S



Hi Karthik,

Here it is...

theTextR = app.selection[0].parentStory.textStyleRanges;
try
{
app.activeDocument.colors.item("Overtracked").name;
}
catch (myError){
app.activeDocument.colors.add ({name:"Overtracked",space:ColorSpace.CMYK,colorValue:[15,100,100,0]});
}

var i=0;

while (i= 15)

{

while (i= 15))

{

theTextR[i].fillColor = "Overtracked";

i++;

}

} else

i++;

}
alert("The tracking value more than -15  and +15 is highlighted in Red color.");

Tags: InDesign

Similar Questions

  • How to get the value of OdiVariable in Java variable

    Hello

    is it possible to get the value of OdiVariable in variable Java please?

    Let me explain it please. I have variable ODI - I say #VAR1 (last alphanumeric default value: 0)
    In the ODI package (technology: Oracle) I want to branch code based on the value:

    < % if ('0'.equeal (#VAR1)) {% >}
    -Branch when #VAR1 is 0
    < %} else {% >}
    -Branch when #VAR1 is not equal to 0
    < %} % >

    This code does not work. I guess #VAR1 to 0 string substitution is done after java - meaning, java generates the code:
    -Branch when #VAR1 is not equal to 0
    and now the substitution is made.

    Any ideas?

    Thank you
    Antonin

    Hi Antonin,

    I would like to contribute a little,

    I never tried with Java I have at home and rely on Jython.

    Suppose that you have a 2 step process, in the first step of the procedure, you have found a few values using alternative methods,

    __________________________________________________________________________

    Step 1:

    Command on the Source:

    Technologies: Oracle

    Logical schema:

    Select <%=odiRef.getSession("SESS_NO")%> in the SESS_NO of the double

    Command on the target:

    Technology: Jython

    mySessNo = #SESS_NO

    __________________________________________________________________________

    Step 2:

    Command on the target

    Technology: Jython

    If mySessNo == 0:
    -Branch when mySessNo is 0
    Another thing:
    -Branch when mySessNo is not equal to 0

    __________________________________________________________________________

    Meaning of Makses?

    P.S: Substitute - with tab.

    Thank you
    G

  • Setting the value of XML in Java script tag

    Hello

    I'm trying to set a value of XML tag in the initialize to a text field event... The code works correctly in FormCalc but I needed it to work in java script.

    FormCalc:

    $record.prospectApplication.typeName = "namedInsured";

    Java Script:

    xfa.record.prospectApplication.typeName = "namedInsured";

    The JavaScript above does not work. Can help any one on this?

    Thank you

    Srini

    Hi Srini,

    In JavaScript you do get all properties by default if you need to say;

    xfa.record.prospectApplication.typeName.value = "namedInsured";

    Who is assign the value to the property "value" not the dataValue object.

  • How to find the Id of component using java script

    Hi all.

    I use Jdev 11.1.6

    I need get the id of the component in javascript code?

    I used this but its coming null

    var exportCmd = AdfPage.PAGE.findComponentByAbsoluteId ('HiddenBtn');

    Alert ("exportCmd" + exportCmd);

    < af:commandButton text = "commandButton 1 ' id = 'HiddenBtn '.

    clientComponent = "true" visible = "false".

    partialSubmit = "false" >

    < af:fileDownloadActionListener filename = "DetailedInventoryReport.xls"

    contentType = "application / vnd.ms - excel;" chatset = UTF-8 ".

    Method="#{pageFlowScope.sfdcInventoryManagedBean.detailedInventoryReportExport}"/ >

    < / af:commandButton >

    < af:resource type = "javascript" >

    function customHandler (actionEvent) {}

    var exportCmd = AdfPage.PAGE.findComponentByAbsoluteId ('HiddenBtn');

    Alert ("exportCmd" + exportCmd);

    }

    Please help me

    AdfPage.PAGE.findComponentByAbsoluteId ('HiddenBtn');  will not work in all cases (for example, in the area)

    Instead, you can link your button to the bean and retrieve id with something like: yourButton.getClientId () (after that, you can pass this javascript function id)

    Or you can try the ActionEvent queue directly on your button like this: Awasthi (Jdev/ADF) Ashish Blog: call to Action button by programming, Queuing ActionEvent

    Another approach to successfully recover clientId: https://blogs.oracle.com/groundside/entry/pattern_for_obtaining_adf_component

    Dario

  • How to get the value on a model that is defined in the java code in email

    Hello

    I created a custom code and send email as well to custom component. I can send emails using the method:

    InternetFunctions.sendMailTo (EmailID, EmailTemplate, subject, cxt);

    But my problem is that I have to get a value in the model of "EmailTemplate" which are defined from java code. but I don't know how to get the value.

    I will highlight in the java code by using this code: binder.putLocal ("ErrorApproveRejectMsg", massegeBody);

    I'm trying to enhance the model using the code below, but not able to get.

    1 < $exec getValue ("#active", "ErrorApproveRejectMsg") $ >

    2 < $exec getValue ("#active", ErrorApproveRejectMsg) $ >

    3 < getValue ("ErrorApproveRejectMsg") $exec $ >

    4 < $exec getValue (ErrorApproveRejectMsg) $ >

    5 < getValue ("#local", ErrorApproveRejectMsg) $exec $ >

    6 < getValue ("#local", "ErrorApproveRejectMsg") $exec $ >

    7 < $ErrorApproveRejectMsg$ >

    8 < $exec ErrorApproveRejectMsg$ >

    Assuming that cxt will be your Service or execution context object

    You can do something like this

    DB. PutLocal ("ErrorApproveRejectMsg", "Error");

    cxt.setCachedObject ("DataBinder", db);

    PageMerger h = new PageMerger (db, cxt);

    cxt.setCachedObject ("PageMerger", h);

    InternetFunctions.sendMailTo (usersEmail, emailTemplate, emailSubject, cxt);

    where db is current databinder object, and you can put any variable custom in the workbook by using the putLocal method.

    Thank you

    Vikram

  • How to read the value of list boxes by iteration in a loop For?

    I have a lot of list boxes on the front of my VI. I want to know how to read the value of this combo with a loop boxes For. The point is that I don't know how to get the reference of each combo box in a loop.

    Any information would be welcome. Thank you!

    su27 wrote:

    I have a lot of combo boxes on the front of my VI [...]

    Be sure to close the references that you have finished with them.

  • How to save the value controls in labview

    Hello
    I want to know how to record the value of controls in the PC. means if I attribute 5 numeric value to a control, he has to stay there even I restart my PC.

    And here is a simple example of using - http://decibel.ni.com/content/docs/DOC-15349

  • To build the waveform.vi function how to calculate the value of dt

    Dear all

    Please guide me How to calculate the value of dt according to waveform.vi of construction

    My sampling rate is 25000 and I take 200000 samples.

    Kind regards

    Muhammad Irfan

    It's all simple arithmetic. The inverse of the sampling frequency power of samples is then the dt or the time between samples the number of samples is not relevant.

  • How to connect the value of the input string to numeric values

    Hello

    I'm trying to figure out how to connect the value of unique user input string to numeric values. Basically I want the user to enter the name of a gas that I have a list for (I think I put the list of gases in a table >). Then I want to match numeric values 2 'a' and 'b', according to which gas, name of the user has set. These 'a' and 'b' values will be automatically matched with the name of the gas in a list that I put. For example, hydrogen gas has the value 3 for "a" and 4 for "b. when the user puts the ' hydrogen' name in a string constant, automatically 'a' and 'b' must be issued.» I have connect a and b to a formula

    Thanks for any help

    Hello

    It is perhaps not exactly what you are looking for, but perhaps you could use the enumerated data type and the array of clusters of points (a, b).

    Look at the VI I enclose.

  • How to find the value?

    How to calculate the value of 2.50e + 2 in the analysis of string function when the %f format string is selected?

    the format may be stung a control

  • How to find the value max and min for each column in a table 2d?

    How to find the value max and min for each column in a table 2d?

    For example, in the table max/min for the first three columns would be 45/23, 14/10, 80/67.

    Thank you

    Chuck,

    With color on your bars, you should have enough experience to understand this.

    You're a loop in the table already.  Now you just need a function like table Max and min. loop.  And you may need to transpose the table 2D.

  • How to get the value of an editField on onUnfocus()

    I want to check the value of an editfield on focusout/focusouthandler(), how to get the value in the onUnfocus() method?

    getText

  • How to pass the value?

    Hello.. I'm creating an application of streaming, in which I have a list field in a screen like this...

    1

    --------

    2

    --------

    3

    --------

    and when the item 1 is selected means a url must be passed to the video player...

    I created the list field screen in a package and a video player in other package... but I do not know how to pass the value of the field from the list to the player... Help, please... its URGENT...

    You can get the index selected by the listname.getSelectedIndex () method and compare that value with Vector data (data store URL) .that you will give a correct value from the URL and pass it.

  • How to get the value of the TextField on Buton FieldChangeListener

    friends I am new on the development of blackberry applications could you please help me how to get the value of text I typed in the textField when I click the button?

    constructor

    public Dialogs()
    {
      
    using design in the same screen
      
    Display display = new MainScreen();
      
    ButtonField btnPress = new ButtonField();
    btnPress.setLabel ("press me");
    btnPress.setChangeListener (ButtonPressListener);
      
    TxtValue TextField = new TextField();
    txtvalue.setLabel ("enter something :");
      
    HFM VerticalFieldManager = new VerticalFieldManager (VerticalFieldManager.FIELD_VCENTER);
    HFM. Add (txtValue);
    HFM. Add (btnPress);
      
    mainScreen.add (hfm);
    pushScreen (mainScreen);
      
      
    }

    FieldChangeListener ButtonPressListener = new FieldChangeListener() {}
    ' Public Sub fieldChanged (field field, int context) {}
        
           
    Dialog.Alert (t.GetText ());
         
         
         
    }
    };

    any help would be appreciated.

    You must ensure that your FieldChangeListener has access to the object of txtvalue, while it can make a

    String inputString = txtvalue.getText ();

  • How to get the value of a column in sql query?

    Hi, anyone knows how to get the value of a column in sql query?

    Here is my code, the value must be 1350079224397 in my PB, but I get 0

    QString query ("SELECT version FROM db_version");

    QVariant result = sda.execute (query);
    QVariantMap versionMap = result.toList () such () .toMap ();
    If (! versionMap.IsEmpty ())
    {
    qDebug()<"Version: "=""><>
    }

    OK, I have the solution

    QString query ("SELECT version as version FROM db_version");

Maybe you are looking for

  • RDXV60KB - tuning menu does not appear after Exchange of power supply

    The earlier fault of decommissioning has been cured by replacing the PSU, but since the setting menu does not appear. The other mistake is the selection of VIDEO channels can be seen but on HDD and DVD there is only sound and a blank image. It's the

  • iPhone SD card reader

    I just got my new Lightning for my iPhone SD card reader.  I upgraded to 9.2, I put some JPEG files on a SD card and plugged.  My phone tells me that he has 'No Photos to import'.  Am I missing something or are my expectations too high?

  • Windows cardspace Error 1067

    When you try to access Windows Cardspace in the Control Panel, security and privacy link, I get the message that it does not start because of the Error 1067.  How to open this program?

  • MMonitor.exe APPCRASH error after logging in to the user account

    Please let know us a solution: after working with a HP technician to address a problem of user account that does not allow me to log on to my PC (starting in safe MODE and remove user account with registry edit .bak file), I get an error message when

  • trying to cam on the bottom bar restote icon

    I have not cam wth e-mail chat rooms etc. trying to restore the icon on the bottom bar cam