Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 87158

Why mFound = mTarget.findGrep() not work on cs5.5?

$
0
0

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


Viewing all articles
Browse latest Browse all 87158

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>