Skip to content

Instantly share code, notes, and snippets.

@dancrew32
Created November 8, 2011 23:44
Show Gist options
  • Save dancrew32/1349735 to your computer and use it in GitHub Desktop.
Save dancrew32/1349735 to your computer and use it in GitHub Desktop.
search and replace text nodes in indesign
(function() {
var aintShit = NothingEnum.nothing;
function changeShit() {
var from = prompt('Change:', '');
var to = prompt('To:', '');
app.findGrepPreferences.findWhat = from;
app.changeGrepPreferences.changeTo = to;
app.documents.item(0).changeGrep();
}
function destroy() {
app.findGrepPreferences = aintShit;
app.changeGrepPreferences = aintShit;
}
function init() {
destroy();
changeShit();
destroy();
}
init();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment