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