Question
How can I search for Text in Textframes even if it is not shown?
The following code is supposed to scan thru all textframes.
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
app.findChangeGrepOptions.includeFootnotes = true;
app.findChangeGrepOptions.includeHiddenLayers = true;
app.findChangeGrepOptions.includeLockedLayersForFind = false;
app.findChangeGrepOptions.includeLockedStoriesForFind = false;
app.findChangeGrepOptions.includeMasterPages = true;
app.findGrepPreferences.findWhat = "\{\{[^:]*\:[^}]*\}\}";
var frames = app.activeDocument.textFrames;
for (frame = 0; frame < frames.length; ++frame) {
currentFrame = frames[frame];
try {
var hits = currentFrame.findGrep();
for (var i = 0; i < hits.length; i++) {
hits[i].contents = hits[i].contents.replace(/\{\{([^}]*)\}\}/g,lookupEntry);
}
} catch (e) {}
}
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;Sadly, it doesnt find Text that i no shown, like when the text is bigger than the frame.
How can I search thru all text in the frame regardless if it fits into it?
