Copy link to clipboard
Copied
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....![]()
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
...Copy link to clipboard
Copied
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
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more