How can I search - replace in master pages only?

Hello world

How can I search - replace in master pages only?

for example:

I want to change in 2013-2014, but only in master pages.

in master pages for all of the open files.

How can I do?

Teetan

Hi Teetan,

To set a goal is more of halfway to creation script.

Check this box:

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 = "\\b\\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;
}

Jarek

Tags: InDesign

Similar Questions

  • How can I create a new master page with a different set of pages for the menu bar?

    I want to create a new Master Page that could be used for a different set of pages with a different menu pointing to other pages...

    For example:

    Master A to include a menu for pages:

    Page 1, Page 2, Page 3,

    Master B to the guests for the pages menu:

    Page 1, Page 4, Page 5...

    Maybe I would also do Master C and D with a bar of menus different total...

    But how can I isolate the menu bar from the rest of the pages that I don't want it?

    Right click on this page that you want to isolate > menu goto option > exclude from the menu.

    Hope It could help.

  • pfc1510 how can I stop it printing test page

    pfc1510 how can I stop it printing test page, it does whenever I turn on printer began after ink cartage replace I don't know how to stop it.

    Hello

    What happens if you unplug the printer from the computer and then restart the device?

    Also, try a hard reset after you disconnect the printer.

    Hard Reset:

    Take out the toner cartridges.

    Unplug the power cord from the printer and the wall

    Wait for 30 seconds

    Plug the power cord into the printer and the wall (be sure that the printer is plugged into the wall and not a surge protector)

    Replace the toners/cartridges in the printer

    Let me know the results

  • How can I search for all files not containing a speific (_) character in a folder in Windows 7?

    How can I search in Windows 7 for all files not containing a speific (_) character in the file?

    I have two files with about 50 000 files in each folder.  There are many copies of the same file (only one folder contains photos, the other file has data files.  In the two files copies have the same name as the original file, for example IMG01, but identified for example IMG01_1, IMG01_2, etc..)

    I would like to find all files that DO NOT have a _ in them.  Can I do this?  How?

    Or I have to search for all files that have a _ by searching for * _ *?  Delete these files?

    I tried, but program trotted for 2 hours.  Just take a while?

    I thought that if I could search only files without the _ it would be more effective.

    Less than 20% of the files in each folder have not a _ in them.

    You should be able to use a? or * to replace a number of characters that are either unique or variable.  * book would find both book and facebook, or? ook would only book.

    Anyway, there's probably not a way to identify the files corrupted by a search.

  • How can I search for emails?

    Title says it all. How can I search for emails containing a word or phrase in a file?

    Global search
    https://support.Mozilla.org/en-us/KB/global-search

    Quick filter toolbar
    https://support.Mozilla.org/en-us/KB/quick-filter-toolbar

  • How can I disable the message ' exit page / stay on the page.

    How can I disable the message ' exit page / stay on the page "Please explain step by step so if he is inserting java script.

    Thank you

    Install this Greasemonkey script should help: https://userscripts.org/scripts/show/23865

    (Note that this might break some sites, and is not approved/controlled by Mozilla in any way shape.)

  • the new firefox open my home page in addition to the start page of firefox, everytime I open firefox. How can I stop this and make sure ONLY my home page shows?

    the new firefox open my home page in addition to the start page of firefox, everytime I open firefox. How can I stop this and make sure ONLY my home page shows?

    Delete the USER. JS file if there is (some plug-ins create in addition to prefs.js).

  • How can I organize on side in pages - as in word?

    How can I organize on side in pages - as in word?

    Not in the 5 Pages, only in 4 Pages.

  • In the Finder, how can I search/list of the files in the folder of final characters in filenames, i.e. 'to end-with' alphabetical rather than by default "starting by" alphabetical?

    In the Finder, how can I search/list of the files in the folder of final characters in filenames, i.e. 'to end-with' alphabetical rather than by default "starting by" alphabetical?

    As far as I know, you can't.

  • How can I create my own template pages, to print a 4-page newsletter on both sides of the tabloid-size paper?

    How can I create my own template pages, to print a 4-page newsletter, using both sides of the tabloid-size paper?

    The finished newsletter should be a folded booklet: a piece of 11 x 17 paper folded to form a 8.5x11 "booklet". This clearly means pages 1 and 4 should be printed on one side of the tabloid sheet and pages 2 & 3 on the other.

    I can't find such a model in the Pages.

    There is no such a model, so you'll have to make your own, using a spread on presentation of your newsletter.

    Use shapes, images and text boxes to position available for your model.

    You didn't say what version of Pages that you are using but if it's Pages 5.x, it has no text boxes related so this will make it difficult and it's going to be a lot of manual work.

    Peter

  • How can I search for hexadecimal number of 32-bit in .csv file

    Hello

    How can I search for 32-bit in .csv file usinf labview 8.6.1 hexadecimal number

    Mathan,

    This post was not really a solution.  He just ordered Sandy to post in the appropriate forum, which we now know is LabVIEW 8.6.1 LV.

    Sandy,

    You want to read the text file, then use the search/Split String function to find the matching characters that make up your hexagonal pattern.

    What you ask is a little strange wordly since .csv files are text files, and you ask a "32-bit hexadecimal number.  Can you give an example of what you are looking for?  My response assumes you have a 8 string that consists of the characters 0-9, A - F for catch the 4 bytes.  Maybe you are dealing with just 4 bytes that present themselves as ASCII characters in a text file.  In which case you wouldn't have one. CSV file.

    If the response of research/Split String is not useful to you, you will need to provide details about what you are looking for and also an example of your. CSV file.

  • My Dell V305 printer prints very small. How can I get to fill the page?

    My Dell V305 printer prints very small.  How can I get to fill the page?

    Hello

    Were there any changes made on the computer before the show?

    Method 1:

    I suggest you to refer to the article and see if it helps:

    Resources for the resolution of the printer in Windows XP problems

    http://support.Microsoft.com/kb/308028

    Method 2:

    See the articles and check if that helps:

    To set printing preferences

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/print_setting_document_defaults_personal.mspx?mfr=true

    To set the properties of the printer

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/print_setting_printer_props.mspx?mfr=true

    Settings that affect printing

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/print_c_properties.mspx?mfr=true

  • When I open a link "in a new window' in IE - 8, the window is small, how can I do open in full page?

    When I open a link "in a new window' in IE - 8, the window is small, how can I do open in full page?

    Hello

    Do not use the maximize button (or property of start-up).

    1. Start it IE as you normally would.
    2. Open a link in a new window (or whatever your nommal procedure that causes a window IE smaller size).
    3. Close the original windows, leaving only the small size, a
    4. Resize this last IE window by dragging the edges to be almost full screen - do not use the maximize button!
    5. Close the window of the latter and the size parameter should stick.

    $C

    God will not look you over for medals, but for scars. Each winner has scars; I do this either on the same heart

  • How can I search using a word or phrase in the file?

    I can't find anything using windows 7. How can I search using the old option to find "a word or phrase in the file" when I don't know the file name, type, or location, as we could do in XP and all the previous versions?

    Hi rayf1967,

    I was back tonight, saw your post and tried a search in my .xls and .xlsx files.  They results were not as I suspected.  But now is a result of the work.

    I had left the 'files allow on this drive to have content indexed in addition to file properties' unchecked.  This means that my old index was sought but changes or new files were not included.  When finally, I went to properties and permit of indexation for the drive, I could search for .xls and .xlsx text files inside the cells and inside the text boxes.  I edited my last post to include this observation.

    Window 7 file & directory search success
    Yahoo! I finally successfully a text file for a search string.  Thank you Lisa and Thahaseena I have studied the links and then did some testing over a period of 5 hours.  FYI, I get using the old DOS commands in .bat files.  Understand the new search engine was much more difficult than learning a RegEx in the 1980s.

    1 CAUTION: The box of the property known as the disk:
    "Allow files on this disc have content indexed in addition to file properties"
    This check box controls the update of the data base of the index.  It must be checked to build or update an index that may be searched.
    You can select the entire disc or only a subset of records.
    For discs:
    RT-click file / properties
    For the records:
    RT-click File / Properties / General tab / advanced

    I correctly searched for file names and files with this box unchecked, but the results do not include the files created or edited since the last time the index was built or in other words since the indexing has been authorized.

    2. research in the files has N O T by default after my installation of W7.  My system keeps all the files on a non-system drive and that the drive did not appear in the search index settings. Fault of not Ms.

    3. research in the files REQUIRES that the drive/directories are specified:
    Set the locations:
    Control Panel/Indexing Options/change /-down and check any disk or dirs you want indexed.
    Set the file types you want to allow search inside:
    Panel of control/indexing options / Advanced Options/File Types/Index Properties and the content of the file - set as you wish
    The file types are grouped and there are filter categories they fall.
    Defining the .txt (plain text filter) to "Properties Index and contents of the file" will allow many other types of files to be indexed.  The same is true for .doc (Microsoft Office filter); This one will allow indexing for all Office files.
    My QuadCore 3 GHz/4 GB indexed to 2500 points per second.  I have let it run overnight on my drive of files I have about 3 hours to complete.

    4. read on "Windows Search Advanced Query Syntax" it can help you a lot.

    5 W7 will show what looks like a mistake/complaint at research suggesting that you change your settings for indexing.  This will happen even if you have defined the so ignore/disable it.

    E x a m p l e s (all text left - has been typed/pasted in the search box):

    1 test cycle after: 07/20/10 - find all the file names with the string 'test' in them with update a value greater than 20/07/10.

    2 * test*.txt after: 07/30/10 - it found only files of type .txt 'test' in the name and modifed today (30/07/10).

    3. content *.txt: citabria after: 20/07/10 - searched the citabria word in files of text changed after 20/07/10!

    4. content *.docx: citabria after: 20/07/10 - searched the citabria word within Word files modified after 20/07/10!

    5 *.xlsx content: fardap - looking for the word inside all my files fardap .xlsx; found in cells and the text box.

  • How can I search for all photos that have names composed of four numbers?

    OT: Help search.

    Hello, I want to seek a photo (.jpg), photography is as the name of 5225.jpg, which consists of four digits. How can I search for all photos that have names composed of four numbers? Thank you

    I don't know how to search only images that carry the 4 numbers, but I know how to find a file that is exactly 4 letters long and ends with ".jpg".

    To do this, type this in your search box (exactly as it is, including quotation marks):

    "file name:"? "jpg"

    It will search for all files that have exactly 4 characters followed by .jpg at the end.

Maybe you are looking for