Hi, everyone
I got this script:
app.doScript('main()', ScriptLanguage.JAVASCRIPT, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "grow numbers on masters");
function main() {
catchOption = app.findChangeGrepOptions.includeMasterPages;
app.findChangeGrepOptions.includeMasterPages = true;
app.findGrepPreferences = changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "\\b20\\d+\\b";
var
mTarget = app.documents.everyItem().masterSpreads.everyItem().textFrames.everyItem(),
mFound = mTarget.findGrep(),
mConFound = [],
len = mFound.length;
if (len && mFound[0].constructor.name == "Array")
while (len-->0)
mConFound = mConFound.concat(mFound[len]);
len = mConFound.length;
while (len-->0) {
mConFound[len].contents = String(Number(mConFound[len].contents) + 1);
}
app.findChangeGrepOptions.includeMasterPages = catchOption;
}
it works very fine in the cs6, but not work in cs5.5
I don't know why
and you?
Teetan