Answered
Exclude master objects in a Script
How can I exclude TextFrame on MasterPages running the following code?
function main() {
targetFrames = [];
var doc = app.activeDocument;
var allTextFrames = doc.textFrames;
// we only want the text frames in specific LAYER
for (var i = 0; i < allTextFrames.length; i++)
if (allTextFrames[i].itemLayer.name == targetLayout)
targetFrames.push(allTextFrames[i]);
