3 Replies Latest reply on May 20, 2014 12:22 AM by poortip87

    How to create and apply a condition to selected text?

    poortip87 Level 1

      Hi All,

       

      I am new to InDesign scripting. I am using Flex 4.6, so I am using ActionScript. I want to apply conditional texts to some selected texts in my document. I understand the process manually. But am having problem doing it programmatically.

       

      I see that there is a Condition class. I created an object of this class and tried to assign some values.

      var nameCondition = new Condition();

      nameCondition.indicatorMethod = ConditionIndicatorMethod.USE_UNDERLINE;

      nameCondition.label = "Name";  // Couldn't understand what label stands for

      nameCondition.name = "Name"; 

      nameCondition.visible = false;

       

      Now, when I debug, I see that the values that I assigned to nameCondition object are never assigned.

       

      I also came across the appliedConditions method that is available in the app and doc levels. But, I am not sure how to use it.

       

      Please help.