Find/Change HELP

Hi,
Anyone know the code for find/change command on text for specific pages?
Example: I want to change some text from page 20 to 40 -
Please help

There is no such code.
You can select all the text you want and apply your changes to "Selection" only. (Of course you can only select contiguous text -- that is, all of the text frames should belong to a single running story.)

Similar Messages

  • Find/Change help with wildcard numbers...

    hello... i'm looking for help with wildcards...
    i have a specific task to complete.. i need to add dash & space into a space in a string of letters and characters...
    here
    221kbps - 00:28:34space dash space here47Mb - 44.1 kHz
    198kbps - 01:27:43 41Mb - 44.1 kHz
    215kbps - 00:34:52 156Mb - 44.1 kHz
    225kbps - 00:32:14 54Mb - 48 kHz
    so my finished text will look like this
    221kbps - 00:28:34 - 47Mb - 44.1 kHz
    198kbps - 01:27:43 - 41Mb - 44.1 kHz
    215kbps - 00:34:52 - 156Mb - 44.1 kHz
    225kbps - 00:32:14 - 54Mb - 48 kHz
    there are many variables to the text - but i thought perhaps i could create a wildcard digit find/change based on the Mb bit, replacing the single space with space dash space
    BUT
    i need to retain the numbers before the Mb
    so my question - is it possible to RETAIN WILDCARD NUMBERS?
    merci beaucoup!

    omg... just fell of my chair
    tried it in text - no joy...
    tried it as a grep.
    YES YES YES
    thankyou so much - i have about 18,000 to format for a music website...
    www.littledogdiscs.co.uk
    if you ever find your way to our neck of the woods in the South of France - please do visit my b&b
    www.maisonverdigris.com
    i have a bottle of vintage champagne with your name on it...
    thanks
    teresa

  • Find/Change GREP - FindChangeByList - help!

    Hi,
    Can anyone help with my GREP problem? I have a long unformatted list of products, I need a couple of GREP find and change queries to help format the list. The formatting will be based on paragraph styles for product header, description and product code. I have GREP working correctly to find the product code lines and apply the 'product code' paragraph style, but I'm struggling to target the product header line. The product header is on the next line after the product code, or it could be found on the line above the product description. I need GREP to find the product header to apply the product header paragraph style. I'm looking at using FindChangeByList; so far I have the folowing:
    grep
    {findWhat:"(Product Code|Product code)$"}
    {appliedParagraphStyle:"Product Code-green"}
    The above line finds all the Product Codes and applies the paragraph style. It works perfectly well from Indesigns Find/Change panel and FindChangeByList.
    But the next bit doesn't work:
    grep
    {findWhat:"^(?<=\\r)", appliedParagraphStyle:"Product Code-green"}
    {changeTo:"", appliedParagraphStyle:"Product Header-green"}
    I've tried to target the 'Start of a paragraph (^)' (this will be the product header) that has - 'Paragraph Break (\r)' with the 'Product Code-green' applied (this is the product code), in front of it. - (Am I right in thinking that in the FindChangeByList script I need 2 slashed on \\r - I have tried with 1 and 2 - no joy.)
    If I do this in Indesigns Find/Change panel it does kind of work. If I click find, it will find the correct point, and click change, it will apply the correct style to the product header - BUT if I click CHANGE ALL - it doesn't work. It reports '0' instances found, yet if i click Find again it will find the next instance. So it's kind of working on an individual click and find basis, but not on global change all - STRANGE? And it doesn't work at all when run from FindChangeByList.
    Anybody got any thoughts on why this is happening? or a better piece of GREP to try? Would really like it to be running from FindChangeByList. Hope the above makes sense.
    Thanks

    Hi,
    You can go straight or try to modify 'MultiFind' script.
    I suggest to use a text conditions and go straight with this code:
    var
              mDoc = app.activeDocument,
              mCond = mDoc.conditions.item("mFound"),
              mPath = "~/Documents/ID_words_to_find.txt",
              mDelimiter = ",",
              mSource = File(mPath),
              mOpen = mSource.open("r",undefined,undefined),
              len, len1, mWordsArr, mFound;
    if (!mCond.isValid)
              mCond = mDoc.conditions.add({
                        name: "mFound",
                        indicatorColor: UIColors.LIGHT_BLUE,
                        indicatorMethod: ConditionIndicatorMethod.USE_HIGHLIGHT,
                        underlineIndicatorAppearance: ConditionUnderlineIndicatorAppearance.SOLID
    if ( !mOpen) {alert ("Can't open a source file"; exit()};
    mWordsArr = mSource.read().split(mDelimiter);
    len = mWordsArr.length;
    app.findTextPreferences = null;
    while (len-->0) {
              app.findTextPreferences.findWhat = mWordsArr[len];
              mFound = mDoc.findText();
              len1 = mFound.length;
              while (len1-->0)
                        mFound[len1].appliedConditions = [mCond];
    app.findTextPreferences = null;
    How it works (should)?
    Assumed:
    - a list of words to find is in a .txt file as comma-delimited (you could set other delimiter)
    - this file is named 'ID_words_to_find'  and saved in user Documents folder (you can change mPath)
    Script define a condition 'mFound' and apply it to every word from your list found in a document. They are highlighted. You can modify them.
    Notice: to remove a condition (highlight) modify a word including a space before it.
    Enjoy:)
    Jarek

  • Help for find/change glyphs script

    Hi everyone!
    I need help for creating a script (or modifying existing script) that should replace every Cyrillic character  from an old ASCII font with the same Cyrillic character but from new Unicode font.
    For example: Capital letter 'A' GID=107 from old font (Lazurski) should be replaced with 'A' GID=630 from new one (Myriad Pro).
    I can do this by using Indesign Find/Change - Glyphs, but this will take me too much time.
    So, I need a scrip for this job.
    My first attempt was to use the FindChangeByList script by modifying the FindChangelist.txt document, but without success.
    Here is what I've used until now:
    1)  glyph {glyphID:107, appliedFont:"Lazurski"} {glyphID:630, appliedFont:"Myriad Pro"} {caseSensitive:false, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
    2)  glyph {findWhat:"u00C0", appliedFont:"Lazurski", fontStyle:"Bold"} {changeTo:"0410", appliedFont:"Myriad Pro", fontStyle:"Bold"} {caseSensitive:false, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find ASCII A replace with Unicode A.
    Both lines didn't change anything. What is wrong?
    Any help is welcome!
    Regards,
    Veselin
    P.S. Indesign CS5

    Thank you Jongware!
    The codes (both ID and Unicode) are correct for sure, but even with correct notation (obviously my was wrong) the script don't change anything.
    Here is the line in the FindChangeList:
    text {findWhat:"\u00C0", appliedFont:"Lazurski", fontStyle:"Bold"} {changeTo:"\u0410", appliedFont:"Myriad Pro", fontStyle:"Bold"} {caseSensitive:false, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find ASCII A replace with Unicode A.
    Update:
    Finally, I found what is wrong with the script - the properties "caseSensitive:false".
    By removing that properties the script works fine.
    So, I successfully converted a book with old ASCII Cyrillic font to Unicode Opentype font.

  • JS:CS3 Newbie needs help! find/change character styles

    I'm new to scripting and JavaScript is giving me a headache, but I'll keep trying. What I'm trying to do is automate a few things so that the production time of our school newspaper is reduced while insuring accuracy.
    I've played around a little with the text find change sample and the changing or adding paragraph styles in the InDesignCS3_ScriptingGuide_JS.pdf and I barely understand what I'm doing.
    When us page designers receive text to place in the document, our editors mark the text with tags like: < b >text< / b >, where the word "text" is to be bolded. (there wouldn't any spaces between < and b and > etc. I just did that so It'll show up here). We have basic character styles and paragraph styles set up, and we just started working with nested styles.
    Is there a way we can search for the < b > tag and bold everything after it up until the < / b > tag? Sort of the way it does for html (the way it would do for this message if I took out the spaces). It'll be great if it could remove the tags as well, but if not, I know I could create a find/change script to do the removal afterwards.
    I appreciate any input.
    Thanks!

    You've not found yourself the easiest of tasks! You need GREP find/replace, not text. Do you have any experience with GREP? It's worth investigating, it's a powerful feature. The script below handles bold. For clarity, it doesn't do any error checking: it assumes that there's a document with text in it and that the document contains a character style called 'bold'.
    // talk to Indesign, nobody else
    #target indesign
    // reset the Find/Change dialog
    app.findGrepPreferences = app.changeGrepPreferences = null;
    // find everything between <b> and  (including these codes)
    app.findGrepPreferences.findWhat = '<b>.+?</b>';
    // add 'bold' style
    app.changeGrepPreferences.appliedCharacterStyle = 'bold';
    // make the changes
    app.activeDocument.changeGrep();
    // now delete the <b> and </b> codes
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = '</?b>';
    app.changeGrep();
    You can adapt it easily to handle other codes, and at a later stage you could generalise it so that you needn't repeat whole bunches of code.
    Good luck with your first forays. Again, it's not the easiest of tasks, but it's worth getting to grips with.
    Peter

  • Help with uppercase letters in Find/Change

    Hiyis. I'm trying to change all instances of "US" to "U.S.," but when I type it into Find/Change, I'm getting stuff like "discuss" highlighted. Any way to specify just uppercase US on its own? Or do I have to go through and review every suggested change?
    Thanks tons!

    Click the icons for case sensitivity and whole word in the dialog:

  • Help with Find/Change and wildcards

    I have indesign CS5 and I'm working on a document that has math examples throughout such as 9-1=8. The proofreader said we need to change it to have a space between each digit and math symbol to be 9 - 1 = 8. How can I do this? When I go to Find/Change I have the option of wildcards in the Find, but not in the Replace.
    Also the dash in these equations need to be changed to en dashes. How can I tell indesign that anytime is sees such an equation the dash needs to be changed? I don't want to just change all dashes as I have many dashes that need to stay.

    I do it in two steps, first changing the hyphens to en-dashes:
    Find (?<=\d)-(?=\d) which finds any hypen between two digits
    Replace ~= which is the en-dash
    Then use a class to hold the math symbols:
    Find (\d|\))([\+\*/~==])(\d|\()   (this adds open and close parentheses to the search before or after a symbol -- if your equations don't use parentheses you can eliminate the |\( and |\) from the first and last search groups)
    Replace $1 $2 $3  (there's a space between the terms there).
    This does not include radicals, or advanced math symbols in the search, so if your equations use those, you need to add them, and it doesn't put spaces between digits and parentheses.

  • How to Open Find/Change with menuAction

    Hi,
    Read the question carefully I'm asking how to open the Find/Change
    dialog, not how to toggle it.
    Toggling is easy enough:
    app.menuActions.itemByName("$ID/Find/Change...").invoke();
    But if it is open, this will close it, and vice versa.
    I'm wondering if there's any way to specifically make sure it's opened?
    Thanks,
    Ariel

    Hi Ariel,
    This probably won't help but see https://forums.adobe.com/message/4413557#4413557
    If you could perform some action that will fail if the panel is closed then you could use a try catch to determine its state.
    I'll leave it to you to think of what that action would be.
    Trevor

  • Finished script: Use grep find/change to fill in a supplied table of contents

    This script is now complete, and has been the subject of most of my previous posts. Just in case anyone wanted to know what the finished script ended as, here it is.
    Thanks so much to all. A lot of really helpful folks on this board are very responsible for the success of this task. This script is to be one of hopefully many in the creation of our records. But it's a huge leap forward. Thanks again to everyone that helped.
    Cheers,
    ~Nate
    Task:
    Automatically find town names in listings, and fill in table of contents template on page 2 accordingly.
    Example of page 2 toc, initially:
    Example of a page of content. The town names are what need to be referenced on the TOC:
    Example of page 2 toc once script is finished:
    Because of the need to include the transaction dates on the TOC (comes as a provided, tagged-text file), a simple Indesign-generated TOC can't be used alone.
    This script uses an Indesign-generated TOC that's on a master page called "T-tocGen" ... It then uses grep search and replaces to grab the needed information, and insert it into the page 2 TOC.
    The script will update a generated TOC and then search for an instance of a page number, and town name. The generated toc lists all included towns in the following format:
    (line start)## tab townName(line end)
    In Grep, this would be (please note, extra \ for \d and \t ... javascript needs that for some reason):
    ^\\d+\\t(.*)$
    After the script gets the info it needs from a found instance of the above, it replaces that line with "---", to prevent that line from being picked up once again.
    The script with then place the needed page number in it's rightful place on page 2, replacing the XX.
    A while loop is used to repeat the above process until there are no longer any instances of "^\\d+\\t(.*)$" present.
    Not every town runs every issue, so once the script is done, it removes all remaining instance of "XX" on the page 2 TOC.
    FINAL CODE:
    TOC replace
    This script will use grep find/change methods to apply page numbers in
    tocGen to the XX's on page2TOC.
    // define the text frame of generated TOC
        var tocGenFrame  = document.masterSpreads.item("T-tocGen").pages.item(0).textFrames.item(0);
    // udpate generated TOC ... store contents in tocGenStuff
        var tocGenStuff = updateTOCGen();
    // set variable for while loop
    var okGo = "1";
    // while okGo isn't 0
    while(okGo.length!=0)
    // get town info from tocGen
    getCurrentTown();
    // replace XX's with tocGen info
    replaceTown();
    // grep find ... any remaining towns with page numbers in tocGen?
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "^\\d+\\t(.*)$";
    // set current value of okGo ... with any instances of above grep find in tocGen
    okGo = tocGenFrame.findGrep();   
    // grep find/change all leftover XXs in page2TOC
    app.findGrepPreferences = app.changeGrepPreferences = null;       
    app.findGrepPreferences.findWhat = "^XX\\t";
    app.changeGrepPreferences.changeTo = "\\t";
    app.activeDocument.changeGrep();  
    // clear grep prefs
    app.findGrepPreferences = app.changeGrepPreferences = null;
    //  functions                  //
    function getCurrentTown()
    // grep options   
    app.findChangeGrepOptions.includeLockedLayersForFind = true;
    app.findChangeGrepOptions.includeLockedStoriesForFind = true;
    app.findChangeGrepOptions.includeHiddenLayers = true;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findChangeGrepOptions.includeFootnotes = true;
    // grep find:  startLine anyDigits tab anyCharacters endLine
          app.findGrepPreferences = app.changeGrepPreferences = null;
          app.findGrepPreferences.findWhat = "^\\d+\\t(.*)$";
    // get grep find results      
    currentGen = tocGenFrame.findGrep();  
    // store grep results content into currentLine
    currentLine = currentGen[0].contents;
    // match to get array of grep found items
    currentMatch = currentGen[0].contents.match("^\\d+\\t(.*)$");
    // second found item is town name, store as currentTown
    currentTown = currentMatch[1];
    // change current line to --- now that data has been grabbed
    // this is because loop will continue as long as the above grep find yields a result
           app.findGrepPreferences.findWhat = "^\\d+\\t"+currentTown+"$";
                  app.changeGrepPreferences.changeTo = "---";
                tocGenFrame.changeGrep(); 
    function replaceTown()
    app.findChangeGrepOptions.includeLockedLayersForFind = true;
    app.findChangeGrepOptions.includeLockedStoriesForFind = true;
    app.findChangeGrepOptions.includeHiddenLayers = true;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findChangeGrepOptions.includeFootnotes = true;
    // find: XX currentTown .... replace with: currentLine
        app.findGrepPreferences = app.changeGrepPreferences = null;
        app.findGrepPreferences.findWhat = "^XX\\t"+currentTown+" \\(";
        app.changeGrepPreferences.changeTo = currentLine+" \(";
    app.activeDocument.changeGrep();   
    function updateTOCGen()
    //set vars ... toc text frame, toc master pag
        var tocGen  = document.masterSpreads.item("T-tocGen").pages.item(0).textFrames.item(0);
        var tocGenPage  = document.masterSpreads.item("T-tocGen").pages.item(0);
    //SELECT the text frame generatedTOC on the master TOC
        tocGen.select();
    //Update Table of Contents by script menu action:
        app.scriptMenuActions.itemByID(71442).invoke();
    //Deselect selection of text frame holding your TOC:
        app.select(null);
    //store contents of toc text frame in variable
        var tocGenText = tocGen.contents;
    //return contents of tocGen
        return tocGenText;

    Thanks for the reply.
    You are correct but the problem is there are three rows, One row is 100% black, the second is 60% black and the third is 40% black. I want to change the black to blue, the 60% black to an orange and the 40% black to a light shaded blue. In the find/change option you can select the tint you want to find and replace but yea.. does work on table cells.. oddly enough.

  • Applescript find/change problem

    I have some text which needs to be styled in InDesign CS4 which has a bunch of extraneous tags ( eg. <b>, <i>, etc.). I have customised the FindChangeList.txt file that supports the FindChangeByList.applescript file to do things like:
    {find what:"<i>"}
    {change to:"^S"}
    which can then be picked up by a nested style. All good so far.
    Problem: the applescript will just not 'see' the strings <b> or </b> in FindChangeList.txt. It treats them like they aren't there. I can do it using the find/replace within InDesign, it works fine there, but my problem is that I have hundreds of pieces of copy to import and I'd like to automate as much as possible. Using GREP has the same effect, ie. works in find/replace within InDesign, but not with applescript.
    Any help would be greatly appreciated as this is really killing me at the moment. Thanks!
    Content of FindChangeList.txt follows. The command in the final line works, the command in the second-last line doesn't.
    (FYI the second line of code contains 'InDesign CS3' regardless of whether I use CS3 or CS4. I guess they didn't update the file)
    --FindChangeList.txt
    --A support file for the InDesign CS3 AppleScript FindChangeByList.applescript
    --This data file is tab-delimited, with carriage returns separating records.
    --The format of each record in the file is:
    --findType<tab>findProperties<tab>changeProperties<tab>findChangeOptions<tab>description
    --Where:
    --<tab> is a tab character
    --findType is "text", "grep", or "glyph" (this sets the type of find/change operation to use).
    --findProperties is a properties record (as text) of the find preferences.
    --changeProperties is a properties record (as text) of the change preferences.
    --findChangeOptions is a properties record (as text) of the find/change options.
    --description is a description of the find/change operation
    --Very simple example:
    --text          {find what:"--"}          {change to:"^_"}          {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}          Find all double dashes and replace with an em dash.
    --More complex example:
    --text          {find what:"^9^9.^9^9"}          {applied character style:"price"}          {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}          Find $10.00 to $99.99 and apply the character style "price".
    --All InDesign search metacharacters are allowed in the "find what" and "change to" properties.
    text          {find what:"<b>"}          {change to:"^S"}          {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}          Find all bold and replace with non-breaking space.
    text {find what:"<i>"} {change to:"^S"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find all italics and replace with non-breaking space.

    You probably should post this in the ID Scripting forum. Here's an example of some simple AppleScript find and changes that might help:
    --find and replace keyboard formating
    tell application "Adobe InDesign CS5.5"
         --first clear the preferences
         set find text preferences to nothing
        set change text preferences to nothing
        --replaces non breaking space with space
        set find what of find text preferences to "^s"
        set change to of change text preferences to "<0020>"
        set myFoundItems to change text
        --replaces soft return with return
        set find what of find text preferences to "^n"
        set change to of change text preferences to "^p"
        set myFoundItems to change text
        --replaces return space with return
        set find what of find text preferences to "^p<0020>"
        set change to of change text preferences to "^p"
        set myFoundItems to change text
        --replaces 2 returns with return
        set find what of find text preferences to "^p^p"
        set change to of change text preferences to "^p"
        set myFoundItems to change text
        --replaces return, tab, return with return
        set find what of find text preferences to "^p^t^p"
        set change to of change text preferences to "^p"
        set myFoundItems to change text
        --replaces space, return with return
        set find what of find text preferences to "<0020>^p"
        set change to of change text preferences to "^p"
        set myFoundItems to change text
        --replaces space, space with space
        set find what of find text preferences to "<0020><0020>"
        set change to of change text preferences to "<0020>"
        set myFoundItems to change text
        --replaces 3 tabs with tab
        set find what of find text preferences to "^t^t^t"
        set change to of change text preferences to "^t"
        set myFoundItems to change text
        --replaces 2 tabs with tab
        set find what of find text preferences to "^t^t"
        set change to of change text preferences to "^t"
        set myFoundItems to change text
    end tell

  • Find/Change problems within a nested style?

    I have a problem with Find/Change (in both CS4 and CS5) not recognizing text within its “find” parameters when text that fits those parameters is part of a nested style. I want to find any instance of italic in the text, regardless of what paragraph or character style it is, but F/C only intermittently finds italics, both within and without that text existing in a nested style. Has anyone come across this issue?
    There is NOTHING different about the text that is recognized by F/C–or not recognized–that shows up in any of the panels or palettes. There are no font conflicts. I’ve replaced prefs and saved data files. If I go into the character palette and change the italic portion of the nested style to “italic” character style (it shows up in character palette as [none], even though it has a nested style), then F/C finds it for sure; but if I don’t do that, then F/C will sometimes find it, and sometimes not, and sometimes in one instance and not in another! There is no hidden formatting that shows up in story editor. I remade another nested para style with the same formatting but with varying results! Help… I’ve tried everything.

    I have a problem with Find/Change (in both CS4 and CS5) not recognizing text within its “find” parameters when text that fits those parameters is part of a nested style. I want to find any instance of italic in the text, regardless of what paragraph or character style it is, but F/C only intermittently finds italics, both within and without that text existing in a nested style. Has anyone come across this issue?
    There is NOTHING different about the text that is recognized by F/C–or not recognized–that shows up in any of the panels or palettes. There are no font conflicts. I’ve replaced prefs and saved data files. If I go into the character palette and change the italic portion of the nested style to “italic” character style (it shows up in character palette as [none], even though it has a nested style), then F/C finds it for sure; but if I don’t do that, then F/C will sometimes find it, and sometimes not, and sometimes in one instance and not in another! There is no hidden formatting that shows up in story editor. I remade another nested para style with the same formatting but with varying results! Help… I’ve tried everything.

  • [JS CS3] How to load Find/Change dialog?

    Hello,
    Below is a script that uses GREP to find straight apostrophies and then change them to smart (curly) ones. The script invokes the Find/Change dialog so that the user can see what she or he is doing.
    However, if the user last used the Find/Change dialog in the TEXT mode, that is the mode that appears. I want the script to go to the GREP mode. I see that there is code for app.loadFindChangeQuery(queryName, searchMode), but I have no idea what the "queryName" is and how to use it in this script.
    Thanks for any help.
    Tom
    theGrepLoader("~'", "~]");
    function theGrepLoader(grepFindIt, grepChangeIt){
        app.findGrepPreferences = NothingEnum.NOTHING;
        app.changeGrepPreferences = NothingEnum.NOTHING;
        app.findGrepPreferences.findWhat = grepFindIt;
        app.changeGrepPreferences.changeTo = grepChangeIt;
        app.menuActions.item("Find/Change...").invoke();
    }//end theGrepLoader

    Thanks, Peter!
    I appreciate your help but I have found another solution. I am amazed at my own stupidity sometimes. You see, I do my scripting in a very lame sort of way because I have never used Javascript outside of InDesign. As such, I find myself at a disadvantage because the documentation that Adobe provides assumes that you are aware of many of the basics. Case in point: I have always had trouble manipulating strings because I NEVER KNEW that you could search and replace strings! I just could not find examples of this in the Adobe documentation. So here I was in some cases adding temporary textFrames so I could get to my strings as text contents and then removing the temporary textFrames at the end of the script. In this particular case I needed to merge several paragraphs into one paragraph. Now that I know how to search & replace strings, it is so simple to strip away all the paragraph returns (which are included in text contents). I am learning, albeit rather slowly. Thanks again.
    Regards,
    Len Swierski

  • [AS] CS3 Find -Change inserting soft return instead of hard

    Can anyone help identify why this script doesn't work? i want it to replace multiple returns with a single paragraph return. It's replacing with a soft return rather than a hard return.
    I copied and pasted the find grep and change grep fields into the script. I even tried it by typing "\r" into the change grep field. Any thoughts? Much appreciated!
    tell application "Adobe InDesign CS3"
    --Clear the find/change preferences.
    set find grep preferences to nothing
    set change grep preferences to nothing
    set find text preferences to nothing
    set change text preferences to nothing
    --Set the find options.
    set include footnotes of find change grep options to false
    set include hidden layers of find change grep options to false
    set include locked layers for find of find change grep options to false
    set include locked stories for find of find change grep options to false
    set include master pages of find change grep options to false
    --delete multiple graphs
    set find what of find grep preferences to "~b~b+"
    set change to of change grep preferences to "
    set myStory to parent story of item 1 of selection
    tell myStory
    set myFoundItems1 to change grep
    end tell
    set find grep preferences to nothing
    set change grep preferences to nothing
    end tell

    Shane, thanks! This worked. What I meant to have written was that when copying "~b" from the find/change field in InDesign and pasting into Script Editor, and saving, it converted it automatically to a hard return. I didn't try it manually because sometimes the obvious is elusive! (to me at least)
    Thanks again.
    Jim

  • JS for Find/Change

    I am a novice with JS, but trying to make a couple of enhancements to workflow using scripting. I have managed to figure most things out ok, but usually just need a little kickstart. What I am trying to do is:
    InDesign CS2
    Find a specific sequence of characters in a text selection (in this case, " - " (that is space dash space) and replace with end of nested style & forced line break (^h^n). At the same time, search for double carriage returns and change to single carriage returns (^p^p => ^p).
    Currently, using the Find/Change Function from the Edit menu but I'd like to be able to just apply a script to do it all. I have tried to dig through the archives for a similar posting, but haven't had a lot of luck. If anyone can please point me in the right direction, it would most certainly be greatly appreciated!
    Thank you in advance.
    -Scott

    Thank you Peter ... I have just purchased the electronic version of the O'Reilly book that you recommend. This will certainly help.
    One thing that is not clear ... can I use characters such as "^p" or "^h" directly when setting my parameters, or is there a unicode equivalent that I would need to use?
    Thanks again.
    -Scott

  • Find/Change Inserting paragraph break

    Hello
    I am trying to insert a paragraph mark between two lines of text using find/change
    The first line has a heading style and I want to insert an empty line (Paragraph) after it and before the next line (without changing any formatting)
    I am able to use enter the correct parameters in find but can't figure out what parameter to use in 'Change to"
    Forced line break doesn't produce what I want. Neither does standard carriage return (not sure what that is)
    I have tried both Text and Grep dialogs without success. Yes I read the help files.
    This will be simple for you guys but is stumping me.
    Any ideas oh brilliant ones?
    As usual Thanks much in advance

    Err, a paragraph mark? You mean a paragraph break?
    Anyhow, if you insist on Doing it Wrong, you can use ^p ("End of Paragraph") in the change field. So you might
    change ^p to ^p^p to insert a blank paragraph between each paragraph. For instance. But again, it is the wrong answer.
    Yes-a paragraph break.' Sorry for the imperfect terminology
    The first line is a heading style which I was advised in this forum to make into a 'list style' due to TOC issues
    The 'doing it wrong' paragraph is going to be used to anchor a graphic and then converted to a very small paragraph mark (nearly invisible) as advised in another article
    I did use the
    change ^p to ^p^p
    but it creating another list style as the paragraph break. Its ok. I went ahead and did it anyway and then manually changed all of those entries into a regular paragraph 'break'
    With 300 graphics I would like to automate this but.....
    Thanks for your reply

Maybe you are looking for

  • HT1430 I already own an iPhone & have purchased and iPod touch for my husband. How can I have a  completely separate Apple ID for both of the devices?

    I have purchased an iPhone 4s 2 years ago and recently purchased an iPod touch for my husband while he was abroad working. I used the same Apple ID when setting up the iPod touch but now I want to know how I can have two separate Apple IDs. One for h

  • Mac mini no longer connects to external monitor

    I had my mac mini connected to a LG HDTV and it worked great up until recently. When I know go to the external connection it says "signal not found". I then tried to connect it to the monitor on my desktop and that doesn't work either. I'm guessing t

  • #2032 Stream Error when downloading .air file for update

    Hi guys, I have made a very simple self update air application. When the .air file to download for updating is on a localhost server everything works fine, however when the .air file is on a remote server I got a #2032 stream error when trying to dow

  • Landed ost posting

    Hi Experts, This is Regarding lended cost Posting error. when i posted landed cost document based on the GRPO, In the Journal Entry,  Postings are happening like this : Material Purchase Price  Gain (Dr) and other epenses like freight for ex, insuran

  • Transfer Price vs Transfer Cost

    Hello Gurus, I have a very basic question on the Transfer Price vs Transfer Cost terminology in SAP. Can you guys give me some explanations/examples of differences between Transfer Price vs Transfer Cost in SAP terms. I appreciate your time. Thanks