Apply Find & Replace Script to .INDB?

Hi Chaps,
Is there a way to apply a Find and Replace-type script to an InDesign Book (CS4 > .indb)?
I have a .indb file that my have a number of documents, each with the term "EURO" in a number of tables. I want to change this to "GBP" in all the documents, but would like to automate the process, rather than manually applying the script to each document.
Anybody know of a script to do this?
Many thank
Samuel

Do you really need to find all the occurences in all the documents? If yes it is simple. Open all documents and then run the following script
myResetFindChangeGrep();
app.findGrepPreferences.findWhat = "\\<EURO\\b";//word Boundary is set
app.changeGrepPreferences.changeTo = "GBP";
app.changeGrep();
myResetFindChangeGrep();
alert("Done");
function myResetFindChangeGrep(){
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
for example:
1254 EURO, 11255.EURO -->these conditions will match
1911EURO, EUROPE--> these conditions will not match.
Green4ever

Similar Messages

  • Script to find/replace regular to Italic based on search terms in .txt

    Sorry for such a newbie post.
    I have been reading on JS scripts for find/replace.  I'm hoping develop a script or find one that is written that
    1. Looks into a .txt or any searchable file format, containing search terms
    2. Script will run on the entire Indesign document
    3. For any matching search terms script replace the style from regular to Italic, or from Bold to Bold/Italic. 

    Perfectly doable. Do you want to give it a go yourself?
    A few first thoughts (things I'd probably solve myself while writing the script):
    1. JS can read any file, but getting just the plain text out of an MS Word document is kind of ambitious -- even for me. Keep it simple: if your search text is nothing but a list of keywords or short phrases, write them out in a plain text file, one search item per line.
    2. With that I presume you mean not on one single continuous story, but all over the file -- including loose text frames, master pages, and what-have-you-got. Thass' easy, you can set the target for a Find or Replace operation with pin-point accuracy.
    3. .. This is the interesting part, actually.
    (a) Do you want to change the text style? That will set an override "+" for the modified text. It would be safer (wiser, etc.) to change it using a character style. (For the script it doesn't matter which method you use, this is just for the Future You who is going to edit this file in 6 months.)
    (b) If you do use a character style: what should happen if there already is one applied? Not bold or italic, but underline, for instance. Applying a new char style will override this one.
    (c) The naive approach (which I probably would have taken first) is to first search for each of the search terms, go over the 'found' list and test for each single entry if it's in regular or bold, then take appropriate action.
    A better approach -- without knowing anything else about this document -- could be to blindly use Replace to change ALL search terms in "Regular" to "Italic" and ALL search terms in "Bold" to "Bold Italic". It sure would be faster.
    (d) Just like in the interface, you can search for a word and 'change' only the formatting -- no need to change the text as well. And just like in the interface, you need to specify "whole words" and/or "case sensitive".

  • Find & replace part of a string in Numbers using do shell script in AppleScript

    Hello,
    I would like to set a search-pattern with a wildcard in Applescript to find - for example - the pattern 'Table 1::$*$4' for use in a 'Search & Replace script'
    The dollar signs '$' seem to be a bit of problem (refers to fixed values in Numbers & to variables in Shell ...)
    Could anyone hand me a solution to this problem?
    The end-goal - for now - would be to change the reference to a row-number in a lot of cells (number '4' in the pattern above should finally be replaced by 5, 6, 7, ...)
    Thx.

    Hi,
    Here's how to do that:
    try
        tell application "Numbers" to tell front document to tell active sheet
            tell (first table whose selection range's class is range)
                set sr to selection range
                set f to text returned of (display dialog "Find this in selected cells in Numbers " default answer "" with title "Find-Replace Step 1" buttons {"Cancel", "Next"})
                if f = "" then return
                set r to text returned of (display dialog "Replace '" & f & "' with " default answer f with title "Find-Replace Step 2")
                set {f, r} to my escapeForSED(f, r) -- escape some chars, create back reference for sed
                set tc to count cells of sr
                tell sr to repeat with i from 1 to tc
                    tell (cell i) to try
                        set oVal to formula
                        if oVal is not missing value then set value to (my find_replace(oVal, f, r))
                    end try
                end repeat
            end tell
        end tell
    on error number n
        if n = -128 then return
        display dialog "Did you select cells?" buttons {"cancel"} with title "Oops!"
    end try
    on find_replace(t, f, r)
        do shell script "/usr/bin/sed 's~" & f & "~" & r & "~g' <<< " & (quoted form of t)
    end find_replace
    on escapeForSED(f, r)
        set tid to text item delimiters
        set text item delimiters to "*" -- the wildcard 
        set tc1 to count (text items of f)
        set tc2 to count (text items of r)
        set text item delimiters to tid
        if (tc1 - tc2) < 0 then
            display alert "The number of wildcard in the replacement string must be equal or less than the number of wildcard in the search string."
            error -128
        end if
        -- escape search string, and create back reference for each wildcard (the wildcard is a dot in sed) --> \\(.\\)
        set f to do shell script "/usr/bin/sed -e 's/[]~$.^|[]/\\\\&/g;s/\\*/\\\\(.\\\\)/g' <<<" & quoted form of f
        -- escape the replacement string, Perl replace wildcard by two backslash and an incremented integer, to get  the back reference --> \\1 \\2
        return {f, (do shell script "/usr/bin/sed -e 's/[]~$.^|[]/\\\\&/g' | /usr/bin/perl -pe '$n=1;s/\\*/\"\\\\\" . $n++/ge'<<<" & (quoted form of r))}
    end escapeForSED
    For what you want to do, you must have the wildcard in the same position in both string. --> find "Table 1::$*$3", replace "Table 1::$*$4"
    Important, you can use no wildcard in both (the search string and the replacement string) or you can use any wildcard in the search string with no wildcard in the replacement string).
    But, the number of wildcard in the replacement string must be equal or less than the number of wildcard in the search string.

  • Applying Bolds and Italics while doing a Find/Replace on Data Merged content

    Hi,
    Wonder if you kind knowledgeable folks can help me with a Find/Replace question.
    I am doing a data merge of a book contents into indesign, where my data merge file is a straightforward text csv file which is tab delimited. I have two (almost similar) things I would like to do to specific parts of the text but don't know how to achieve this. 
    -  Firstly, I would like to preserve words/sentences with an 'italic' form but this is obviously lost in a csv file.  Is there anyway I can mark these words in order that a find/replace can make this word italics.  Im hoping there is a solution which resembles something like this;
    eg.  Book content is "The Word Italic needs to be adjusted".
    Original content is amended to be "The Word $Italic$ needs to be adjusted", so that a dollar sign encapsulates the word to be made Italic.
    Then I am able to data merge the csv file and somehow do a find/replace of words/sentences which are encapsulated by the dollar sign.  Thus, doing a find/replace of all words/sentences which satisfy this condition and then apply italics to all words between the dollar signs.
    - My other issue is I am using the '|' character in my text to determine the paragraph seperators.  I then do a find/replace after importing the text to replace all instances of '|' to the paragraph seperator (a kind of $ symbol, a representative character from the pop-up menu to the right of the Change To box). This works fine, but I'd like to make the paragraph seperator to be a BOLD format so that it can distinguish better the seperating sections of text.
    But this is different from my 'italics' issue above since I am trying to apply a BOLD format to the 'Change to' character, rather than something which exists in my original csv.
    Hope I make sense but I'd be happy to provide screenshots etc (when I get home )
    Best Rgds
    L

    two solutions.
    for the italic solution, i'd say the OP answered his own question with one exception - don't use dollar symbols, instead use = or another character which isn't reserved by GREP.
    the solution i would use for italics would be a GREP search once the merge is complete. have a look at the picture to see what i've done.
    the second solution: GREP styles.
    this assumes that the text will have a paragraph style assigned to it. make a character style called BOLD and within that style, the only thing to change is within basic character formats, make the font style bold. could even make the character another colour such as cyan so it is more easily idenfiable.
    next, go to the paragraph style options, go to GREP styles and match the following screengrab
    the advantage with a GREP style is that once the pipe symbol (|) is replaced, its bold GREP style character formatting is lost; and it means less post processing and no need for a second search of the text - it's all live.

  • Find Replace from Textfile with regex

    Hello.
    I'm wondering if anyone knows about an existing script that does a find/replace by list like the script "FindChangeByList.jsx" that comes with every InDesign installation.
    This consists of tow parts, the script itself with the functionality and a simple textfile where you have simple one-liners capable of find/replace with regex.
    the Textfile:
    //FindChangeList.txt
    //A support file for the InDesign CS4 JavaScript FindChangeByList.jsx
    //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          {findWhat:"--"}          {changeTo:"^_"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double dashes and replace with an em dash.
    //More complex example:
    //text          {findWhat:"^9^9.^9^9"}          {appliedCharacterStyle:"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 "findWhat" and "changeTo" properties for findTextPreferences and changeTextPreferences.
    //If you enter backslashes in the findWhat property of the findGrepPreferences object, they must be "escaped"
    //as shown in the example below:
    //{findWhat:"\\s+"}
    grep          {findWhat:"  +"}          {changeTo:" "}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double spaces and replace with single spaces.
    grep          {findWhat:"\r "}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a space And replace with single returns.
    grep          {findWhat:" \r"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a space and replace with single returns.
    grep          {findWhat:"\t\t+"}          {changeTo:"\t"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double tab characters and replace with single tab characters.
    grep          {findWhat:"\r\t"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a tab character and replace with single returns.
    grep          {findWhat:"\t\r"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all returns followed by a tab character and replace with single returns.
    grep          {findWhat:"\r\r+"}          {changeTo:"\r"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double returns and replace with single returns.
    text          {findWhat:" - "}          {changeTo:"^="}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all space-dash-space and replace with an en dash.
    text          {findWhat:"--"}          {changeTo:"^_"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all dash-dash and replace with an em dash.
    The script:
    //FindChangeByList.jsx
    //An InDesign CS5.5 JavaScript
    @@@BUILDINFO@@@ "FindChangeByList.jsx" 3.0.0 15 December 2009
    //Loads a series of tab-delimited strings from a text file, then performs a series
    //of find/change operations based on the strings read from the file.
    //The 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          {findWhat:"--"}          {changeTo:"^_"}          {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}          Find all double dashes and replace with an em dash.
    //More complex example:
    //text          {findWhat:"^9^9.^9^9"}          {appliedCharacterStyle:"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 "findWhat" and "changeTo" properties for findTextPreferences and changeTextPreferences.
    //If you enter backslashes in the findWhat property of the findGrepPreferences object, they must be "escaped"
    //as shown in the example below:
    //{findWhat:"\\s+"}
    //For more on InDesign scripting, go to http://www.adobe.com/products/indesign/scripting/index.html
    //or visit the InDesign Scripting User to User forum at http://www.adobeforums.com
    main();
    function main(){
              var myObject;
              //Make certain that user interaction (display of dialogs, etc.) is turned on.
              app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
              if(app.documents.length > 0){
                        if(app.selection.length > 0){
                                  switch(app.selection[0].constructor.name){
                                            case "InsertionPoint":
                                            case "Character":
                                            case "Word":
                                            case "TextStyleRange":
                                            case "Line":
                                            case "Paragraph":
                                            case "TextColumn":
                                            case "Text":
                                            case "Cell":
                                            case "Column":
                                            case "Row":
                                            case "Table":
                                                      myDisplayDialog();
                                                      break;
                                            default:
                                                      //Something was selected, but it wasn't a text object, so search the document.
                                                      myFindChangeByList(app.documents.item(0));
                        else{
                                  //Nothing was selected, so simply search the document.
                                  myFindChangeByList(app.documents.item(0));
              else{
                        alert("No documents are open. Please open a document and try again.");
    function myDisplayDialog(){
              var myObject;
              var myDialog = app.dialogs.add({name:"FindChangeByList"});
              with(myDialog.dialogColumns.add()){
                        with(dialogRows.add()){
                                  with(dialogColumns.add()){
                                            staticTexts.add({staticLabel:"Search Range:"});
                                  var myRangeButtons = radiobuttonGroups.add();
                                  with(myRangeButtons){
                                            radiobuttonControls.add({staticLabel:"Document", checkedState:true});
                                            radiobuttonControls.add({staticLabel:"Selected Story"});
                                            if(app.selection[0].contents != ""){
                                                      radiobuttonControls.add({staticLabel:"Selection", checkedState:true});
              var myResult = myDialog.show();
              if(myResult == true){
                        switch(myRangeButtons.selectedButton){
                                  case 0:
                                            myObject = app.documents.item(0);
                                            break;
                                  case 1:
                                            myObject = app.selection[0].parentStory;
                                            break;
                                  case 2:
                                            myObject = app.selection[0];
                                            break;
                        myDialog.destroy();
                        myFindChangeByList(myObject);
              else{
                        myDialog.destroy();
    function myFindChangeByList(myObject){
              var myScriptFileName, myFindChangeFile, myFindChangeFileName, myScriptFile, myResult;
              var myFindChangeArray, myFindPreferences, myChangePreferences, myFindLimit, myStory;
              var myStartCharacter, myEndCharacter;
              var myFindChangeFile = myFindFile("/FindChangeSupport/FindChangeList.txt")
              if(myFindChangeFile != null){
                        myFindChangeFile = File(myFindChangeFile);
                        var myResult = myFindChangeFile.open("r", undefined, undefined);
                        if(myResult == true){
                                  //Loop through the find/change operations.
                                  do{
                                            myLine = myFindChangeFile.readln();
                                            //Ignore comment lines and blank lines.
                                            if((myLine.substring(0,4)=="text")||(myLine.substring(0,4)=="grep")|| (myLine.substring(0,5)=="glyph")){
                                                      myFindChangeArray = myLine.split("\t");
                                                      //The first field in the line is the findType string.
                                                      myFindType = myFindChangeArray[0];
                                                      //The second field in the line is the FindPreferences string.
                                                      myFindPreferences = myFindChangeArray[1];
                                                      //The second field in the line is the ChangePreferences string.
                                                      myChangePreferences = myFindChangeArray[2];
                                                      //The fourth field is the range--used only by text find/change.
                                                      myFindChangeOptions = myFindChangeArray[3];
                                                      switch(myFindType){
                                                                case "text":
                                                                          myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                                                          break;
                                                                case "grep":
                                                                          myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                                                          break;
                                                                case "glyph":
                                                                          myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                                                                          break;
                                  } while(myFindChangeFile.eof == false);
                                  myFindChangeFile.close();
    function myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
              //Reset the find/change preferences before each search.
              app.changeTextPreferences = NothingEnum.nothing;
              app.findTextPreferences = NothingEnum.nothing;
              var myString = "app.findTextPreferences.properties = "+ myFindPreferences + ";";
              myString += "app.changeTextPreferences.properties = " + myChangePreferences + ";";
              myString += "app.findChangeTextOptions.properties = " + myFindChangeOptions + ";";
              app.doScript(myString, ScriptLanguage.javascript);
              myFoundItems = myObject.changeText();
              //Reset the find/change preferences after each search.
              app.changeTextPreferences = NothingEnum.nothing;
              app.findTextPreferences = NothingEnum.nothing;
    function myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
              //Reset the find/change grep preferences before each search.
              app.changeGrepPreferences = NothingEnum.nothing;
              app.findGrepPreferences = NothingEnum.nothing;
              var myString = "app.findGrepPreferences.properties = "+ myFindPreferences + ";";
              myString += "app.changeGrepPreferences.properties = " + myChangePreferences + ";";
              myString += "app.findChangeGrepOptions.properties = " + myFindChangeOptions + ";";
              app.doScript(myString, ScriptLanguage.javascript);
              var myFoundItems = myObject.changeGrep();
              //Reset the find/change grep preferences after each search.
              app.changeGrepPreferences = NothingEnum.nothing;
              app.findGrepPreferences = NothingEnum.nothing;
    function myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
              //Reset the find/change glyph preferences before each search.
              app.changeGlyphPreferences = NothingEnum.nothing;
              app.findGlyphPreferences = NothingEnum.nothing;
              var myString = "app.findGlyphPreferences.properties = "+ myFindPreferences + ";";
              myString += "app.changeGlyphPreferences.properties = " + myChangePreferences + ";";
              myString += "app.findChangeGlyphOptions.properties = " + myFindChangeOptions + ";";
              app.doScript(myString, ScriptLanguage.javascript);
              var myFoundItems = myObject.changeGlyph();
              //Reset the find/change glyph preferences after each search.
              app.changeGlyphPreferences = NothingEnum.nothing;
              app.findGlyphPreferences = NothingEnum.nothing;
    function myFindFile(myFilePath){
              var myScriptFile = myGetScriptPath();
              var myScriptFile = File(myScriptFile);
              var myScriptFolder = myScriptFile.path;
              myFilePath = myScriptFolder + myFilePath;
              if(File(myFilePath).exists == false){
                        //Display a dialog.
                        myFilePath = File.openDialog("Choose the file containing your find/change list");
              return myFilePath;
    function myGetScriptPath(){
              try{
                        myFile = app.activeScript;
              catch(myError){
                        myFile = myError.fileName;
              return myFile;
    This is a very useful and easy to maintain script which even people who cant write scripts (but know how to use regex) can do complex search replace mass replacements.
    Would love to find something like this for FrameMaker 12 (as i can't write scripts myself).
    regards
    daniel

    I have visited that site. The first item in the external link says: "You can also configure Firefox to automatically search for text when you type any characters outside of a text field. When typing in a text field these characters should show up in the text field and not trigger the Quick Find bar. "
    What I am looking for is the exact opposite. Once my first search is entered in the text box, and the info comes back, I want to start typing the next symbol, and have it automatically show up in the text box, not the Quick Find box. That is how it was working up until a couple of months ago.

  • Can I use Find & Replace to change the fills and strokes of tables?

    I'm working on a catalog that has a fair amount of tables, that all have the same color scheme.  I need to change all of these tables to a new color scheme, and I'd much rather find a way to do it with one shot.  The tables do not have styles applied to them, so it's not a matter of adjusting the style definitions.
    I know you can do a Find & Replace for text or objects in a specific color. Is there a way to do the same for table cells?  I've tried but haven't had luck getting it to work.
    Thanks!
    -Sean

    Congratulations are in place -- changing parameter names in the right places is one thing, finding out what parts safely can be copied is step 2 in my book "how to become a successful scripter in 10 easy steps"
    You cannot select more than one table in Table mode, but what you can do is select them together with its surrounding text -- just keep on dragging that mouse until you've covered them all. The InDesign Selection is a multi-purpose object (see the way the script has to find out "what is selected"), and one of the things it keeps track of is how many and which tables are "inside" the selection. Then run this slightly amended script:
    a = app.selection[0];if (a.tables.length == 0)
    alert ("You must be kidding; not a single table inside your selection!");
    exit(0);
    for (b=0; b<app.selection[0].tables.length; b++)
    d = app.selection[0].tables[b]; // shortcut
    for (c=0; c<d.cells.length; c++)
      if (d.cells[c].fillColor == app.activeDocument.swatches.item("Bloo"))
       d.cells[c].fillColor = app.activeDocument.swatches.item("Redd");
      // .. Insert more colors here ..
    Now the script doesn't have to check anymore in which part of the table you clicked; it only has to iterate over the ones in your selection, and those are "immediately" accessible through the indexes (the square bracketed variables). And the "shortcut" is so I don't have to type "app.selection[0].tables[b].cells[c].fillColor" every time. (And the script runs marginally faster as well, although it's probably still almost immediate.)

  • Use Find-Replace to paste/wrap Element name?

    Hi:
    For FrameMaker 7.2, structured.
    I'm a longtime *unstructured* FrameMaker who is performing cleanup on some structured FrameMaker documents created by my customer.
    One of my tasks is to find all Index markers and applying the IndexMarker element (square-cornered) tag to the markers.
    I'm currently using the tedious and slow technique of using Find to locate and select the Index tag, then in the Element catalog clicking "IndexMarker" followed by "Wrap".
    I've poked around hoping I could find Copy Special / Paste Special choices that would speed this mousing-intensive chore up, but haven't found any such choices that work.
    So -- is there some "intelligent" way to Find / Replace my way through this problem? Even if I manually have to click Replace at every instance, it's faster than what I'm doing...
    Cheers & thanks,
    Riley

    Riley,
    As much as I appreciate the unsolicited endorsements, I have to clarify that FrameSLT cannot help you with this task. It can do lots of things associated with structural management, but all of its current capabilities are dependent upon existing structure. More specifically, it requires existing structure to find the items for which it intends to manage, which your current markers do not have. So, while it can do things like element wrapping, it wouldn't be able to find the unstructured markers in order to wrap them.
    This would be a reasonably simple task for a custom API client or FrameScript script. If you have zillions of these to do, it might be worth your while to explore that option. If not, Gary's suggestion might be your best bet.
    Russ
    (Owner, West Street Consulting)

  • Using AppleScript with saved Find/Replace Queries

    Hello all,
    I have been trying to create a script with AppleScript to apply a sequence of pre-saved queries created in the find/replace dialog in InDesign CS5 to all open documents.
    I am fairly new to AppleScript and I'm still learning, but this seems like a task it should be able to do? The queries are named 01, 02, 03 etc and I'd like to apply them in order to adjust the text formatting in all open documents.
    Is this the best way to approach the problem or do I need to reproduce the queries within the script?
    Many thanks in advance for any advice.

    Is this the best way to approach the problem or do I need to reproduce the queries within the script?
    Putting them in the script is much more robust. Have you looked at the sample script FindChangebyList?

  • Find/replace styles in Pages 5

    In Pages '09, one can find a style, under the "Advanced" menu in the find/replace pop-up.  I use this to prepare talks, writing my own comments in a different style than what I'll print and hand out.  Thus, I find the style and replace it (with nothing), and be left with simply the text for the handout.  Is there a way to use find/replace in Pages 5 to search and find a particular style?  I can't find it.  Thank you!

    That is an extremely useful feature. I just was using that on a document to hand last night, searching on an expression and applying a style to it, Saved me hours of work. Not something Apple seems to get these days.
    Nobody apparently is supposed to work on Macs anymore, just fiddle.
    Viking is being modest, the count is over 110 known missing features and countless bugs or things that simply don't work as they are supposed to.
    Thankfully there is still Pages '09! For now. Which should still be in your Applications/iWork folder.
    Peter

  • Find & Replace window missing in Toolkit CS5

    Hello--
    I just started using Adobe ExtendScript Toolkit CS5 after installing Photoshop CS5, and ran into a strange problem: the Find & Replace menu option and key command do not function correctly, in that I cannot access Find at all.  The Find / Find Results window does not appear, and I cannot get the window to appear by selecting the option in the Windows tool menu either. This works just fine in Toolkit CS4, and is very frustrating to deal with as I am trying to update my scripts to CS5, but have to do so in the CS4 Toolkit because I can't use the Find functionality.
    I've already searched the forums and google high and low for this problem, but no else seems to have posted about it. I've already tried restarting and uninstalling / installing CS5 and all related tools. Can anyone help?
    Thanks!

    Thanks! Looking in the preferences led me to the answer to the problem: I opened up the XML file and found that findAndReplace was put in an odd TabPane for some reason:
            <TabGroup5>
              <activeChild>findAndReplace</activeChild>
              <parentName>Tabpane13</parentName>
              <visible>false</visible>
            </TabGroup5>
    I changed the parentName to Tabpane0 and the window appears now. Much obliged!

  • How to find & replace in Javascript code?

    Hi all!
    I hope that this turns out to be an easy question! We recently updated several forms (about 50 of them) to alter a select set of field names per customer requirements. However, it turns out that one of these fields is a key field and is referenced in one or more places by JavaScript within the PDF.
    In Acrobat 6 I'd select the option to edit all scripts which would give me a big document with all of the Javascript within the PDF. I could then do a find/replace on the code and save it. Now, using Acrobat Pro 9, I cannot find anything like this. Please don't tell me that I have to search through all of the different form fields and PDF objects to find all of the script pieces tied to objects or events! I'm really, really hoping that there is an easier way to do this since right now I'm out of ideas and really don't want to have to sift through all of the objects in over 50 PDF documents.
    Thanks in advance for pointing me in the right direction!

    Talk about not being able to see the forest for all the trees! I can't believe that I missed that -- I spent quite a while looking all over before posting. *sigh*
    The exact menu sequence (for those interested) is Advanced -> Document Processing -> Edit All JavaScripts...  That is exactly what I needed. Thanks!!!

  • RH8 - Any way to chage styles besides risky HTML find/replace

    Hi - We have created a new .css with updated styles. All the TWs must now manually apply the new styles in every topic, a time consuming task. I know there's the option of doing a find/replace in all topics that will change the HTML, but RH doesn't respond well given its tendency to add tags in the name of being helpful. Attempted to a find/replace and it worked for a heading, but when I went on to a custom paragraph style, the result was not good. Ended up going back to my backup from that day.
    Any suggestions/advice? Has Adobe provided anything in way of a tool that we can use?

    Use Find & Replace
    Search: Specific Tag        p
    + With Attribute                style   =   [any value]
    Action: Remove Attribute   style
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • [JS  CS3] Apply Italics with scripting

    There's a keyboard shortcut called "Apply Italics", which by default is [cmd]+[shift]+[i] on Mac, and  [ctrl]+[shift]+[i] on Windows. I use it often because it will change text to the correct italic style. For instance text with the style "85 Heavy" will change to "86 Heavy Italic" or "Semibold Display" to "Semibold Display Italic".
    Is there any way to access "Apply Italics" with scripting? The action is not available in any menu as far as I know.

    I made this script which will change all text with the character style "I" into proper italics, and creates corresponding character styles. "I" is just a character style with no properties. It gets applied when I import content into InDesign.
    I will end up with styles called "I 37 Thin Condensed Oblique", "I Italic Display" and so on according to the various fonts.
    function applyItalic(){ // Finds all text with Character Style "I" applied in the current document and changes it to proper italic character styles
         var mySelection = app.selection;
         var myDoc = app.activeDocument;
         var myRanges = myDoc.stories.everyItem().textStyleRanges.everyItem().getElements(); // gets every textStyleRange in the document;
         var italicStyle = myDoc.characterStyles.itemByName ("I"); // this character styles has no attributes;
         if (italicStyle == null){
              return;
         var myRange;
         var myFont;
         var newStyle;
         var newStyleName;
         var n;
         for (n=0; n<myRanges.length; n++){
              myRange = myRanges[n];
              if (myRange.appliedCharacterStyle==italicStyle){
                   app.select(myRange);
                   app.menuActions.itemByID(119611).invoke(); // apply italics - same as [cmd]+[shift]+[i]
                   myFont=myRange.appliedFont;
                   newStyleName="I "+myFont.fontStyleName;
                   newStyle=myDoc.characterStyles.itemByName(newStyleName); // if the style is created
                   if (newStyle==null){
                        newStyle=myDoc.characterStyles.add({name: newStyleName, fontStyle: myFont.fontStyleName}); // if the style does not exist yet
                   myRange.appliedCharacterStyle=newStyle;
         app.select(mySelection); // restores the original selection
    applyItalic();

  • Automator--find, replace

    How do I make an Automator script that will take a folder of text files and do a find & replace on each document?
    These are txt files, relatively short, with one or 2 strings that I want to replace with other strings. Like to make this so it will do it for each txt file in a folder.
    Thanx

    HI, according to this page, which looks as though it's a straight lift from the Microsoft help pages:
    "You can't type merge field characters («« »») manually or use the Symbol command on the Insert menu. You must use mail merge."
    Doesn't look promising, I'm afraid.

  • Stop Find/Replace syncing between different apps

    Hi all,
    I was wondering if there was any way to stop the Find/Replace function in some apps from syncing their search terms between each other.
    My problem:
    = Lets say I have Pages and TextEdit open and search for "tree" in Pages.
    = When I go over to TextEdit and do a command+F, the search window will automatically have the word "tree" populated in the search term field.
    = When I search for "shrub" in TextEdit and go back to Pages, the search term field in Pages gets filled in with "shrub" even though I still wanted to continue my search on "tree."
    So far I've seen this happen between any combination of Pages, TextEdit, Numbers, and Safari. Is there any way that I can stop these apps from syncing their search terms between each other?
    Thank you very much in advance.
    Hipsig

    It behave the same in 10.4.11.
    The Search / Replace dialog used by every app is based on a tool delivered by Apple in the resources which apps may use so, an entry made in the dialog of apply A appear in the dialog of appli B. It may appear in more.
    Look at these screenshots.
    The first three share the same string to search.
    They are from apps designed as word processor.
    The two other share an other value.
    They are from apps designed for developers.
    It show us that there are two sets of tools used for the Search / Replace feature, both of them sharing datas between the applications.
    Maybe this feature may be used for interesting things.
    In the operating system, we have only one clipboard but thanks to the described feature, we may pass three strings between two operations with a single switch task.
    It suffice
    to fill the Search field,
    to fill the Replace field
    to fill the clipboard
    from the source document.
    Then in the target document,
    paste the clipboard in the target doc,
    grab the content of the Replace field an paste it in the target doc
    grab the content of the Search field and paste in the target document.
    So, what you describes as anannoying feature which end users like me and you can't change, may be described as an interesting and useful feature.
    Just a matter of point of view (or of philosophy : I see the positive side, you see the negative one).
    Yvan KOENIG (VALLAURIS, France) lundi 5 juillet 2010 22:47:16

Maybe you are looking for

  • Cost update for third party and individual purchase orders

    Hi, We went live in around 5 months back. Last month we changed the configuration so that costs for back 2 back purhcase order will be determined from goods receipt & third party purchase orders could be determined from logistics invoice verification

  • Mac LC 580 won't boot

    My Mac LC 580 won't boot. I have tried the following in a attempt to get it to work: Reset the logic board. Replaced the hard drive. Cleaned the logic board's end connector with contact cleaner. Cleaned the RAM modules with contact cleaner. The only

  • Need to know how to find the DML statment in a form session

    We are using some user interface forms generated by forms-10g. I would like to know what are the DML commands related to a transaction after we commit a transaction thru the form? Its just displaying transaction completed sucessfully. But how to know

  • Getting FRM -18103 , and FRM 10039 error after installing oracle Froms

    Hi, I tried to install the Oracle Developer Suite 10g (10.1.2.0.2) on a Windows XP SP2 64 bit machine . After the installation, when I try to start the form, I get the following Error FRM-18103: Failed to initialize the Development Environment and FR

  • Changing desktop "order"

    erry Christmas!!!! I use 2 monitors - is it possible to have icons/folders/files on the desktop go from left to right? instead of starting on the right of the left monitor and then continuing on the right of the right monitor? I've looked in preferen