I have multiple textframes in my document and i have created a script to replace specific words from a textframe as such:
var linebreak = "<br/>";
if (string.indexOf(linebreak) >= 0) {
var string2 = string.replaceAll(linebreak, "\r");
} else {
alert("false");
}
myFrame = app.activeDocument.textFrames.itemByName("test");
myFrame.contents = string2;
But without having to choose the name of the textframe i would like to do it to all active textframes in the document