Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help!!!; apply conditional text

Explorer ,
Dec 13, 2012 Dec 13, 2012

hi forum,

i have the script and edited to create and apply conditional text to which I have substituted in Find what;;

but i presume, im doing mistaken in using properties for applying conditional text..

could any body help on this..

myCondition = app.activeDocument.conditions.add ({name:"Condition 1",

indicatorMethod:ConditionIndicatorMethod.USE_HIGHLIGHT, indicatorColor:UIColors.YELLOW});

app.findGrepPreferences = NothingEnum.nothing;

app.changeGrepPreferences = NothingEnum.nothing;

app.findGrepPreferences.findWhat = "(?i)(your|you|our)";

app.changeGrepPreferences.applyConditons = "Condition 1";

app.changeGrep();

thanks

shil....

TOPICS
Scripting
679
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Mentor , Dec 13, 2012 Dec 13, 2012

Hi,

In general watch type errors and syntax;

working version:

myCondition = app.activeDocument.conditions.item("Condition 1");

if (!myCondition.isValid)

{

myCondition = app.activeDocument.conditions.add ({name:"Condition 1",

indicatorMethod:ConditionIndicatorMethod.USE_HIGHLIGHT, indicatorColor:UIColors.YELLOW});

}

app.findGrepPreferences = NothingEnum.nothing;

app.changeGrepPreferences = NothingEnum.nothing;

app.findGrepPreferences.findWhat = "(?i)(your|you|our)";

app.changeGrepPreferences.appliedConditio

...
Translate
Mentor ,
Dec 13, 2012 Dec 13, 2012
LATEST

Hi,

In general watch type errors and syntax;

working version:

myCondition = app.activeDocument.conditions.item("Condition 1");

if (!myCondition.isValid)

{

myCondition = app.activeDocument.conditions.add ({name:"Condition 1",

indicatorMethod:ConditionIndicatorMethod.USE_HIGHLIGHT, indicatorColor:UIColors.YELLOW});

}

app.findGrepPreferences = NothingEnum.nothing;

app.changeGrepPreferences = NothingEnum.nothing;

app.findGrepPreferences.findWhat = "(?i)(your|you|our)";

app.changeGrepPreferences.appliedConditions = ["Condition 1"];     // "appliedConditions" & array as a value;

app.changeGrep();

enjoy

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines