I need to find all text frames on the active page in an InDesign document and to put them into an array - in order to grab out one or many text frame(s) carrying a specific script label. I tried
myPage = app.properties.activeWindow && app.activeWindow.activePage,
myTextFrames = myPage.textFrames.everyItem().getElements();
but this doesn't bring those text frames that are -anchored; -in a table cell; -within a group. How can I get really all text frames?
Not in one line.
You may need to start from
myPage.allPageItems
--> which returns an array AND filter it by
arrayElement.constructor.name == "TextFrame"
or
arrayElement.label == "yourTargetLabel"