How to run find replace only in few text frames?
var myDoc = app.activeDoucment;
var myFrame1 = myDoc.textFrames.itemByName("one");
var myFrame2 = myDoc.textFrames.itemByName("two");
var myFrame1 = myDoc.textFrames.itemByName("three"); //and so on
var myFrames = [myFrame1, myFrame2, myFrame3] // and so on
for (var i=0; i< myFrames.length; i++)
{
var myText = myFrames[i].parentStory.contents;
myText = myText.replace(/\r\r/g, "\r"); // double enter to single enter
myFrames[i].parentStory.contents = myText;
}
This is working fine but if any two consective paragraphs has bold format in the starting then after find-replace formatting got mixed. The concern is not to mix formatting of paragaphs.
