Skip to content

Instantly share code, notes, and snippets.

@grefel
Created January 27, 2016 10:35
Show Gist options
  • Save grefel/60ba5bd705dc1bd8bc9e to your computer and use it in GitHub Desktop.
Save grefel/60ba5bd705dc1bd8bc9e to your computer and use it in GitHub Desktop.
GREP Find and do pattern
app.findGrepPreferences = NothingEnum.NOTHING;
app.changeGrepPreferences = NothingEnum.NOTHING;
if (app.findChangeGrepOptions.hasOwnProperty ("searchBackwards")) {
app.findChangeGrepOptions.searchBackwards = false;
}
app.findGrepPreferences.findWhat = "";
var findResults = dok.findGrep();
for (var fr = findResults.length-1; fr >= 0; fr--) {
var findTextObject = findResults[fr];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment