[CS5 JS] excluding the Notes of search and replace

Hello

Does anyone know how to exclude all text within a Note of a search/replace, text or grep operation?

I went through and systematically all the findChangeGrepOptions that had the word "include" in false:

includeLockedStoriesForFind: false

includeLockedLayersForFind: false

includeHiddenLayers: false

includeMasterPages: false

includeFootnotes: false

just to check, but nothing has worked. myText.changeGrep () has again changed the text in the note.

Of course, it would be pretty easy to write a wrapper function

var myChangeGrep = function( textObject, checkNotes ) {
   checkNotes = checkNotes || false;
   results = [];

  // Go through and run changeGrep on all the 
  // parts of the textObject that are not contained inside Notes, 
  // (or just run it on the entire textObject if checkNotes is true),
  // and push the results to the results array as we go along.

  return results;
};

but it has the disadvantage that it returns a table and not a collection of InDesign, as does the regular changeGrep. In addition, as simple as it may be, it would be easier if there was a preference somewhere to take care of this.

Any idea?

Thank you!

There is no preference for that: the scope of search and replace can be set only with five preferences that you have already tried. (In the same way, you can not include/exclude tables.) findGrep() and changeGrep() return an array, for that matter, not a collection.

Tags: InDesign

Similar Questions

  • Try to find the queries of search and replace

    OK, I thought I knew where it was.  I looked at

    C:\Users\phyllis\AppData\Local\Adobe\InDesign\Version 6.0\en_US\Caches
    He has here called FindChangeData and FindChangeDataTmp files, but write them in the folder for the Version 7.5 does nothing.

    So I think I'm looking in the wrong place.  I'm moving all the queries search and replace in InDesign CS 5.5.  Can someone point me to them?

    Thank you, Phyllis

    Try C:\Users\\AppData\Roaming\Adobe\InDesign\------------.

  • How to automate the actions of search and replace?

    Hi, dear ALL

    TestStand has the utility "Find/replace" (Edit menu). Is it possible to run this tool through the TestStand API? I want to select a set of steps in sequence and pass the result to the tab "find the result 1"...

    Kind regards

    Max

    Two things to mention:

    (1) OutputMessages that may have locations are associated with, so that when you double-click it, the sequence editor goes to the location. You can set the location after you create the outputmessage with Engine.NewOutputMessage () (do not pass a context of sequence in this case) and before posting (i.e. before calling OutputMessage.Post ()). To add a location, the easiest method is by calling myOutputMessage.Locations.AddFileLocationByObject () and passing the reference you have to step. See the online help of the API for more information.

    (2) I strongly recommend take you a look at TestStand 2010, there is currently a beta version, you can sign up for:

    http://forums.NI.com/T5/NI-TestStand/announcing-the-TestStand-2010-beta-program/m-p/1136621

    Hope this helps,

    -Doug

  • I can't seem to make the "search and replace string" works as expected.

    I tried to replace "^ []] +---+ ([^] +).» "$*" with $1 in "create table leq_octave_5min (recorded_time DATETIME CONSTRAINT pk1 PRIMARY KEY, leq5m leq5m of FLOAT CONSTRAINT NOT NULL, min min FLOAT CONSTRAINT NOT NULL, max max FLOAT CONSTRAINT NOT NULL, CONSTRAINT of FLOAT L05 05 NOT NULL, CONSTRAINT of FLOAT L10 10 NOT NULL, L50 FLOAT CONSTRAINT 50 NOT NULL, L90 FLOAT 90 CONSTRAINT NOT NULL. L95 FLOTTER CONSTRAINT 95 NON NULL, us01 us01 FLOAT CONSTRAINT NOT NULL, EN02 EN02 FLOTTER CONSTRAINT NOT NULL, fr03 FR03 FLOTTER CONSTRAINT NOT NULL, fr04 FR04 FLOTTER CONSTRAINT NOT NULL, fr05 FR05 FLOTTER CONSTRAINT NOT NULL, fr06 FR06 FLOTTER CONSTRAINT NOT NULL, fr07 FR07 FLOTTER CONSTRAINT NOT NULL, fr08 FR08 FLOTTER CONSTRAINT NOT NULL, fr09 FR09 FLOTTER CONSTRAINT NOT NULL, fr10 FR10 FLOTTER CONSTRAINT NOT NULL Fr11 FR11 FLOTTER CONSTRAINT NOT NULL, FR12 FLOTTER CONSTRAINT NOT NULL fr12, fr13 FR13 FLOTTER CONSTRAINT NOT NULL, fr14 FR14 FLOTTER CONSTRAINT NOT NULL, fr15 FR15 FLOTTER CONSTRAINT NOT NULL, fr16 FR16 FLOTTER CONSTRAINT NOT NULL, fr17 FR17 FLOTTER CONSTRAINT NOT NULL, fr18 FR18 FLOTTER CONSTRAINT NOT NULL, fr19 FR19 FLOTTER CONSTRAINT NOT NULL, fr20 FR20 FLOTTER CONSTRAINT NOT NULL, fr21 FR21 FLOTTER CONSTRAINT NOT NULL Fr22 FR22 FLOTTER CONSTRAINT NOT NULL "(, e23, e23 FLOTTER CONSTRAINT NOT NULL, fr24 FR24 FLOAT CONSTRAINT NOT NULL, fr25 FR25 FLOTTER CONSTRAINT NOT NULL, fr26 FR26 FLOTTENT CONSTRAINT NOT NULL, fr27 FR27 FLOTTER CONSTRAINT NOT NULL, fr28 FR28 FLOTTER CONSTRAINT NOT NULL, fr29 FR29 FLOTTER CONSTRAINT NOT NULL, fr30 FR30 FLOTTER CONSTRAINT NOT NULL, status TEXT (2) st NOT NULL CONSTRAINT).

    The goal was to get the third token, 'leq_octave_5min '.

    The result string is "leq_octave_5min", but the real result string is the input string itself.

    What is the problem with my method?

    I'm sorry.

    I forgot to turn on 'regular expressions' in "Search and replace the String" VI.

    After having turned it on, it works as expected.

  • RegExp search and replace, keep the formatting of the original text

    Hello!

    Will have to perform the Search and replace within a framework of text using RegExp.

    And to retain the original formatting of the text block.

    How is it possible?

    Bad example-, it converts all the text formatting to the format of the first character:

    var reg = /a/gmi;
    var replacer = '*';
    var fr = activeDocument.textFrames[0];
    fr.contents = fr.contents.replace (reg , replacer);
    

    find_and_replace_regexp.jpg

    Thank you!

    I has not yet been tested your code.

    But why you did not play with my code snippet, use something like this:

    // regex_changeContentsOfWordOrString_RemainFormatting.jsx
    // regards pixxxel schubser
    var s = /arguments/gi;
    var replacer = "other string", result;
    var atf = activeDocument.textFrames[0];
    
    while (result = s.exec(atf.contents)) {
        try {
            aCon = atf.characters[result.index];
            aCon.length = result[0].length;
            aCon.contents = replacer;
            } catch (e) {};
        }
    

    Try it and have fun

  • A CS5/6 on the Mac at work, and then re-released a Windows laptop (which I have personal licenses for CS4 design and web), trying to find or decompress files of decent download to make a few changes

    A CS5/6 on the Mac at work, and then re-released a Windows laptop (which I have personal licenses for CS4 design and web), trying to find or decompress files of decent download to make a few changes... anyone got a ferrule or all links on where to go to decompress? The laptop Windows is for personal use and workload to work is too intense and also Mac licenses so no need for the House.

    It is not not clear from your post what you are looking for, but here's a general link for downloads for older versions of Adobe software.

    Other downloads

  • Search and replace for the color gradients?

    Just discovered new "Find and replace" tool which is very neat. However, I can't make it work with gradients. "Finding" a specific gradient if you replace all the forms with that color with another color United or degraded degraded? (Using Flash CS6; although entry users of old versions of Flash welcome whether applicable...)

    Hi Evilbob0,

    Search and replace for color, supports only solid colors.

    Gradients are not supported (in - Flash Pro CS6 and CC).

    Thank you

    Smriti

  • Advanced search and replace. How to replace the space with carriage return?

    10.9.13.0/24, 10.9.4.2/32, 10.9.4.3/32

    in

    10.9.13.0/24
    10.9.4.2/32
    10.9.4.3/32

    Find replace them ',' with carriage return.

    I still find articles on an advanced search and replace, but I can't seem to locate it.

    OS X El Capitan 10.11.3

    3.6.1 the numbers

    HI Brendan,

    You don't need an advanced find and replace for it.

    In the search box, press, then space.

    In the box replace by, press option-return.

    Then click Find and replace and find until you are finished.

    Kind regards

    Barry

  • Search and replace the string formatting

    Hello

    I try to do a search and replace the formatting of a string.

    In the example, I'm looking for the string 'SUCCESSFUL', but it must also begin by usbflash and some number + PASSED.

    I can't get the format to have a number between 1 and 99. The number of replacements should add up to 6 in this case. I tried with \d for any number, and I also tried [1-99].

    Make a right-click on the function search and replace the string.  There is an option to use regular Expressions.  Then give it a try.

    EDIT: You need to set the entry replace all to TRUE.

  • How to remove messages in Exchange 2010 by dates. in a group and exclude the Contacts, record retention and calendar

    How to remove messages in Exchange 2010 by dates.  in a group and exclude the Contacts, record retention and calendar.

    I'm deleting emails from users in a group called MX_Purge file. I need to delete the emails date xx/xx/xxxx to xx/xx/xxxx.

    I also need to exclude the excluded the following records 'calendars' folders 'Contacts' and 'Retention '.

    The server people hang around more in the TechNet forums, if you ask, you will get a much better response:

    http://social.technet.Microsoft.com/forums/en-us/Exchange2010/threads

  • How to find quotes double in searching the Catalog Manager XML and replacement tool? Is it still possible without writing an XML file?

    I am struggling with the XML search and replace in Catalog Manager tool. I want to find a particular column, but due to generic problems, I want to find with the intact double quotes and then replace with double quotes too. For example:

    Front: "CSM_MBR_ASA_INP_EFF_DT"

    After: "Effective Member ASA entry Date"

    The problem with just the text, is that there are columns like CSM_MBR_ASA_INP_EFF_DT_NEW used in the reports that I don't want to touch.

    When I do the exact search and replace as above, I get no results.

    "

  • How can I use search and replace to replace the title of the doc with copy of the h1 content?

    I have a site with about 300 pages which have the same title. I need to replace this title by the same text that appears in the h1 tag on the page (each page is different). Of DW search and replace it? If so, how? I don't really want to go have to go to each page and copy/paste.

    jeffsure wrote:

    Is there a way to tell him to put only the first h1 tag in the title?

    I'm really motivated now to learn regex!

    Yes. Just use the following regular expression instead of the previous:

    ([^<>[\S\s]+?

    )([^<>

    The field is to replace the same.

    The question mark is the [\S\s]+ a lazy search, stopping at the first]

    rather than doing a greedy research that concludes the last

    in the page.

    The regex for learning is difficult, but it can be very rewarding. I would only like the best.

  • Search and replace, unadulterated second character?

    I'm doing a VI that communicates with an external device via a protocol consisting of images. I made a couple of subVIs that put these images together as hexadecimal strings which are then converted into numbers and passed to the device. The protocol uses an escape character to avoid sending a constant BOF or EOF at the wrong time. I did a Subvi, which is supposed to do this by using the search and replace. Initially, it looks quite elegant, but it has a fatal flaw, if one of the characters it is supposed to hide is written on the edge of a byte, it will always be replaced.

    Example:

    11 01 00 CE 0D 05 08 EA

    is replaced by

    11 01 00 05 08 EA 0D E7

    C0, C1, 7 d are the characters to replace, the 7 d is the escape character.

    Now I wonder, is it possible to do a search and replace function search only every second character in a string?

    Hi Tzench,

    Why you do not work with numbers of converts? It should be easier (and safer) to replace some U8 values instead of search (errors) & replace in a string...

    You should also be careful when you give examples. So in your example, the "hex" number is separated by spaces, search & replace should not create problems with "byte-border '!

  • File save to preserve search and replace queries when reinstalling?

    I need to uninstall and reinstall CS6. I have a large number in search and replace queries that would be extremely difficult to redefine. How do I save these as well as other features such as the areas of work or Actions in PhotoShop?

    Your saved queries find/replace are in a folder in your library to the user or the user's profile (depending on your operating system). You can find the path to where they are stored in the information provided for the InDesign Defaults file to replace your preferences. The folder queries saved is in the same folder as the InDesign Defaults file. Note that this is a HIDDEN on all recent operating systems folder.

    There was also a case of workspaces in the same place for ID. Similar records should be found for other programs under their respective application folders to the same location of the user's library/profile.

  • GREP: Search and replace

    Does anyone know if its possible to take a list (shown on the lower part of the image) and run a GREP search and replace to create the list of tabs (shown on the picture)?

    I know that the majority of it can be made with the regular search and replace: separate the first and last name; MD and MD #; Postal code and telephone number.

    What I was not able to understand is how to add a tab forward and backward the state abbreviations 2-digit, the Middle Initial, phone number and more important even if there is a way to add tabs in when there aren't the same amount of lines, such as the field of specialty.

    I know that I can use the GREP search and replace to add a tab before each paragraph back, then remove the tab where there are 2 paragraph after each game returns, then substituting a tab and a paragraph back to just a tab, together running all the rows in each set.

    Any help would be greatly appreciated, and if there is anywhere I can learn more about GREP, I would love to learn it.

    Thank you

    Peter

    Doctors List Styles.png

    Peter, try this...

    Find:------.<>

    Replace: \t$0

Maybe you are looking for

  • Battery pro iPad factory

    I just bought the new ipad 9.7 pro and it comes with 10% plant load. Is this normal? I know that most devices equipped with 50-80%. Should I be worried? Maybe an oil change battery so that it was stored?

  • How can I set an alert 'custom' default in iCal

    I want to get a message with his"as the reminder of events in iCal so that I can hear it on my mac and my iphone.  The default value is just a message, so I have to set a custom alert every time.  Is there a way to turn it?  Thank you. Shona

  • No sound on Satellito C50D-A-138 after updating Windows 10

    I upgraded from 8.1 to 10 and the upgrade I have no sound. There is a red cross next to the speaker icon in the system tray. I tried to reinstall the driver (Setup completed successfully) and tried the Windows universal driver, both without success.

  • HP Touchsmart problem with touchscreen driver ect...

    Hello I have a big problem please help me. HP TouchSmart 520-1018fr desktop Model: H0N17EA I no longer Recovery Manager pour restore drivers and software under Windows 8.1 home 64 bit because I want to put the ' with touchscreen. HP TouchSmart 520-10

  • Webkit2web

    What is the problem with WebKit2webProcess.exe seems to want to close my page of safari constantly all the time?