Copy link to clipboard
Copied
Can any one tell me how to iterate through all combinations of conditions and replace with "Unconditional"?
Let's say for example, we have three conditions: A, B, and C. I would need the following combinations to be reaplaced:
A -> Unconditional
B -> Unconditional
C -> Unconditional
A&B -> Unconditional
A&C -> Unconditional
B&C -> Unconditional
A&B&C -> Unconditional
This is just an example. A document may contain any number of conditionals (may be up to eight).
Thank you in advance.
Tak
Assume you're talking about conditional text?
app.activeDocument.textFrames.everyItem().texts.everyItem().appliedConditions = [];
If some is inside tables, you'll also need:
app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().texts.everyItem().appliedConditions = [];
Copy link to clipboard
Copied
Assume you're talking about conditional text?
app.activeDocument.textFrames.everyItem().texts.everyItem().appliedConditions = [];
If some is inside tables, you'll also need:
app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().texts.everyItem().appliedConditions = [];
Copy link to clipboard
Copied
Thanks for the reply. Iterating through every text item, rather than finding and replacing, makes sense.