Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Re: Deleteing assoiated text form conditional text dialiog

$
0
0

Hi Vincent,

 

#target indesign
var myDoc = app.activeDocument;
app.findGrepPreferences = app.changeGrepPreferences = null;// Change "Condition 1" to name of your condition
myConditions = ["Condition 1","Condition 2","Condition 3","Condition 4"];
var l = myConditions.length;while (l--)    {        app.findGrepPreferences.appliedConditions = [myConditions[l]] ;        myDoc.changeGrep();        app.activeDocument.conditions.item(myConditions[l]).remove();    }

 

This presumes that each text only has one condition to it.

If this is not the case things are a little bit more complicated

 

Trevor


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>