2 Replies Latest reply on Oct 26, 2011 6:24 AM by Harbs.

    Grep Find and Excluding

    seba1395 Level 1

      Hello, I would like to excluding one data in my find/change grep.

       

      This is my working code :

      app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

      app.findGrepPreferences.fillColor = 'Red';

      app.changeGrepPreferences.appliedCharacterStyle = app.activeDocument.characterStyleGroups.item("C_02").characterStyles.item("C_02_24");

      obj0.parentStory.changeGrep();

       

      So, I would like to changeGrep on all text but NOT on text that a size at "16pt".

      Exactly : Put my character style on my text that is color is "Red" and all fontsizes except 16.

       

       

       

      Something like this, but doesn't work :

       

      app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

      app.findGrepPreferences.fillColor = 'Red';

      app.findGrepPreferences.pointSize != '16';

      app.changeGrepPreferences.appliedCharacterStyle = app.activeDocument.characterStyleGroups.item("C_02").characterStyles.item("C_02_24");

      obj0.parentStory.changeGrep();

       

      I test again an if but if it's true, the changeGrep is applied on all my text.

       

      Thanks for your help, I have no more idea