2 Replies Latest reply on Jan 21, 2015 10:08 PM by selvam214

    Small Cap with styles or font

    selvam214 Level 1

      Hi,

      If the document used with small cap attribute without using fort style and character style, alert need this occurrence.

       

      Wrong:

      Screen shot 2015-01-21 at 6.00.49 PM.png

       

      Correct:

      Screen shot 2015-01-21 at 6.01.26 PM.png

        • 1. Re: Small Cap with styles or font
          csm_phil Level 4

          Hi selvam214,

           

          try the below JS code.

           

          var myDoc = app.activeDocument;
          app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
          app.findTextPreferences.capitalization = Capitalization.SMALL_CAPS;
          var myFind = myDoc.findText();
          for(var i=0; i<myFind.length; i++){
              if(myFind[i].appliedCharacterStyle.name == "[None]"){
                  alert(myFind[i].contents);
                  }
              }
          app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
          
          

           

          thx,

          csm_phil

          • 2. Re: Small Cap with styles or font
            selvam214 Level 1

            Hi csm_phil,

            Thank you so much for this.

             

             

            Selva