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.

Similar Messages

  • InDesign Scripting or GREP Find/Change?

    Can anyone help me with a script or GREP idea for finding, cutting and pasting the phone numbers at the end of these paragraphs? The first one is what I have and the second is where I would like to get. There are hundreds of these in 4 restaurant directories that I am designing.
    Woodlands (ve) Indian. Weekend buffet. 4078 Jermantown Road. (703) 385-1996. M–F 11:30am–10pm, Sa 11:30am–10pm, Su 11:30 am–9:30pm.
    Woodlands (ve) Indian. Weekend buffet. 4078 Jermantown Road. M–F 11:30am–10pm, Sa 11:30am–10pm, Su 11:30 am–9:30pm. (703) 385-1996.

    You don't need to ask the same question twice. Lets keep all the discussion inthe original topic please,
    http://forums.adobe.com/message/3856456#3856456
    If you are not able to make the anser I provide there work, please provide some details about what is not working, and some before and after screen shots.

  • GREP 'find/change' by list script: find a text string containing different para styles

    Hi
    I'm don't write scripts but do 'enjoy' copying, pasting and changing existing code/txt files.
    I have built a GREP find/change .txt that performs a large number of text edits/changes.
    But I'm left with an issue where I have paragraphs of text (styled earlier in the .txt file) that I'm unable to identify using GREP the usual way. I need to identify text in a particular paragraph style, followed by text in another paragraph style.
    Is it possible with GREP to create a search string to find: text styled with one paragraph style, ending with a paragraph return, and to include in that selection the following paragraph/s styled with another paragraph style?
    MTIA Steve

    seb400 napisał(-a):
    What do you mean by I would mark "changing" in "copying, pasting and changing"?
    Hi Steve,
    I mean I can see a way by modifying some existing code with "find...change" job
    1. set criteria to findGrep
    2. store findGrep() in an array
    3. check each found object if next paragraph matches some new criteria
    4. run changeGrep() if true
    Jarek

  • Text or GREP find/change method to assign tags

    Hi all
    I could use a text or GREP find/change method to  assign tags to paragraph styles (for use in FindChangeByList), would anyone be able to help please?
    Steve

    Hi Peter
    I produce a quarterly magazine for which text is supplied in Word format.
    I currently run the 'FindChangeByList' script to format body text, headings, bulleted and numbered lists, web and email address text styling and to remove/correct all extraneous characters etc.
    Once the job is printed I need to produce a tagged 'accessible' readable (eg: read out loud function in Acrobat) pdf from the file, for text to speech readers.
    I am currently using the map tags to styles function, which allows me to assign tags which in turn gives me control of the 'text reading' order.
    What I'd like to be able to do is automatically apply the Tags to syles while processing the 'FindChangeByList' script.
    Steve

  • 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.)

  • GREP find/change problem

    Hi, am trying to execute InDesign's default find/change AppleScript script to fix many formatting issues in a large document. One of them is occurences of a two-digit dollar figure followed by a comma (eg. "$10,") that needs to be changed to have no comma.
    Using GREP I can pick it up by finding "\$\d\d," but when I replace it with "\$\d\d" I get the actual string "\$\d\d". IE. "$10," becomes "\$\d\d" rather than "$10". Am I misundersting how the 'change' part of GREP works? Can any one advise?
    FYI the line in the find/change support .txt doc is:
    grep
    {find what:"\\$\\d\\d,"}
    {change to:"\\$\\d\\d"}
    {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}
    Remove commas after prices.
    ...which includes extra backslashes to escape the backslashes that are part of the GREP expression.
    Any help much appreciated!
    Thanks.

    No, unfortunately lookbehinds don't work with variable-length strings. That's the case with all GREP implemantations, not just InDesign's. You can sort of get around it by using or-constructs, but they soon become unmanageable. Here's an example (split and indented just for clarity, you would need to write all this on one line):
         (?<=\$\d)
         |
         (?<=\$\d\d)
         |
         (?<=\$\d\d\d)
    This one says "if a comma is preceded by $ and a digit OR by $ and two digits OR by $ and three digits, then . . ." As you understand, if you need to allow up to six or seven digits, possibly thousand separators too, then lookbehinds become unpracticable.
    >I'm really struggling to get to grips with how GREP statements work.
    Try this: http://oreilly.com/catalog/9780596156008/
    Peter

  • Question for scripting gurus: GREP search, change case make Smallcaps

    I have no knowledge of scripting at all, but this question keeps coming up during training sessions: is it possible to (java)script this:
    - Do a GREP search \u\u+
    - Change case to lowercase
    - Apply SmallCaps (or: apply character style)
    this would allow to search for acronyms and change them to smallcaps (or, even better: apply a character style with small caps and tracking)
    I know it is easy for OpenType smallcaps (do a GREP search, change to OT smallcaps) but this doesn't really change case. And some fonts used aren't OT.
    Anyone?
    Would be VERY apreciated!!

    But Harbs is a seasoned scripter who knows he'll get flamed if one of his scripts "just does not work" ;)
    Well, now that you mention it, the script is not really foolproof. It's a quick and dirty script which I threw together very quickly. It's missing any error checking, some of the variables global, and it's not in a private namespace. These are all things which could cause it to "just not work" ;-)
    Here's a more foolproof construct... (and it'll work on the current story if selected, or the whole document if there's no story selected) It will create a new character style if one does not exist and work on character styles within style groups as well. I wrapped the whole script in an anonymous function to give it a unique namespace as well.
    (function()
    if(app.documents.length==0){return}
    var doc=app.documents[0];
    // Change the following to your style name!
    var character_style_name = 'Small Caps';
    try{var range = app.selection[0].parentStory}
    catch (err){var range = doc}
    //comment out next line if you do not want styles.
    var charStyle = GetCharacterStyle(character_style_name,doc);
    app.findGrepPreferences = null;
    app.findGrepPreferences.findWhat="\\u\\u+";
    var finds=range.findGrep();
    for (var i=0;i<finds.length;i++){
    finds[i].changecase(ChangecaseMode.lowercase);
    //comment out next line if you do not want styles.
    finds[i].applyCharacterStyle (charStyle)
    //uncomment next line if you do not want styles.
    //finds[i].capitalization=Capitalization.smallCaps;
    function GetCharacterStyle(styleName,doc){
    var charStyles=doc.allCharacterStyles;
    for(var i=0;i<charStyles.length;i++){
      if(charStyles[i].name==styleName){
       return charStyles[i];
    return doc.characterStyles.add({name:styleName,capitalization:Capitalization.smallCaps});

  • Using Grep to change case in 2nd of a two word string

    Hello all
    I found out after completing my project that I had made a big boo boo.
    I have multiple (hundreds) 2 word botanical names of plants which are all located after a certain heading style throughout 400 pages.
    The first word in this name is capitalized already. Thats ok. But the second word needs to start with a lower case letter ( Instead of a capital letter like it has now).
    All the 2 word names are seperated by commas.
    Any ideas?
    Thanks in advance
    Lauren

    Hi Peter
    OK
    Example:
    Plant Species: Crambe Abyssinica
    Plant Species Synonyms: Brassica Nigra Var. Abyssinica, Crambe Hispanica, Crambe Kilimandscharica
    The headings Plant Species and Plant Species Synonyms are in a character style "Red Bold"
    These plant names are all styled with a character style called "Index"
    The first heading Plant Species usually only has one 2 part binomial name. In this case the second word 'Abyssinica' needs to start with lower case ( I forgot about these when I posted my request)
    The second heading 'Plant Species Synonyms' usually has more than two 2 word names seperated by commas
    There are of coarse some plants which have no plant species synonyms.
    I was able to create an awesome index with scripting help from this forum (Actually it was you Peter K. with some great help from Peter S. !!)
    In order to be 'correct' though these second words of the plant binomial names need to be lowercase.
    These headings and format repeat hundreds of times
    Does this help clarify things a bit?
    Thanks Peter

  • I have acp medicine cd. I copied it to hard disk. Now used start.htm to launch the webpage based application.table of contents is not loading, search not workin

    acp medicine cd is version 2006. I have java 7 update 45.
    Java Plug-in 10.45.2.18
    Using JRE version 1.7.0_45-b18 Java HotSpot(TM) Client VM
    User home directory = C:\Users\Admin.lt01
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@1786789
    basic: Plugin2ClassLoader.addURL parent called for file:/E:/Apps/ACPCD/ACPCD/sam.jar
    network: Cache entry not found [url: file:/E:/Apps/ACPCD/ACPCD/sam.jar, version: null]
    basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@177b4d3
    network: Cache entry not found [url: file:/E:/Apps/ACPCD/ACPCD/sam.jar, version: null]
    network: Cache entry not found [url: file:/E:/Apps/ACPCD/ACPCD/sam.jar, version: null]
    basic: Plugin2ClassLoader.addURL parent called for file:/E:/Apps/ACPCD/ACPCD/sam_java/tree.jar
    security: Accessing keys and certificate in Mozilla user profile: null
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7.0.45
    network: Cache entry not found [url: file:/E:/Apps/ACPCD/ACPCD/sam_java/tree.jar, version: null]
    network: Cache entry not found [url: file:/E:/Apps/ACPCD/ACPCD/sam_java/tree.jar, version: null]
    network: Cache entry not found [url: file:/E:/Apps/ACPCD/ACPCD/sam_java/tree.jar, version: null]
    0
    basic: Embedding dialogs not enabled in Configuration
    security: SSV validation:
    running: 1.7.0_45
    requested: null
    range: null
    javaVersionParam: null
    Rule Set version: null
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7.0.45
    security: continue with running version
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7
    network: Created version ID: 2.2.45
    security: SSV validation:
    running: 1.7.0_45
    requested: null
    range: null
    javaVersionParam: null
    Rule Set version: null
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7.0.45
    security: continue with running version
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7
    network: Created version ID: 2.2.45
    basic: Applet loaded.
    basic: Applet resized and added to parent container
    basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 2891122 us, pluginInit dt 12593728 us, TotalTime: 15484850 us
    basic: Applet loaded.
    basic: Applet resized and added to parent container
    basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 2891122 us, pluginInit dt 12910284 us, TotalTime: 15801406 us
    basic: Applet initialized
    basic: Starting applet
    basic: completed perf rollup
    basic: Applet made visible
    basic: Applet started
    basic: Told clients applet is started
    java.net.MalformedURLException: no protocol: data.gz
    JObjects QuestAgent
    Copyright (c) 1997-2002, JObjects International. All rights reserved.
    http://www.jobjects.com
    java.io.IOException: Failed to open file for read: sam.prm
    at com.jobjects.quest.e.c.a(c.java:55)
    at com.jobjects.quest.e.c.a(c.java:63)
    at com.jobjects.quest.e.c.a(c.java:31)
    at com.jobjects.quest.agent.GenericSearchApplet.init(GenericSearchApplet.java:51)
    at com.jobjects.quest.agent.LiveConnectApplet.init(LiveConnectApplet.java:166)
    at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    [ERROR] Can't load applet parameters from sam.prm <java.io.IOException: Failed to open file for read: sam.prm>
    [DEBUG] Detected browser: sun.plugin
    [DEBUG] Creating search panel.
    [DEBUG] Search panel created.
    [DEBUG] Search applet initialized.
    basic: Applet initialized
    basic: Starting applet
    basic: completed perf rollup
    basic: Applet made visible
    basic: Applet started
    basic: Told clients applet is started

    Did it work when you started it directly from the CD?
    Does it work if you open start.htm in Internet Explorer?
    I don't have much experience with Java issues, but one thing to try would be to clear Java's cache, which is separate from your browser caches. This article has the steps: [http://www.java.com/en/download/help/plugin_cache.xml How do I clear the Java cache?]

  • How can I change the paragraph style of the Table of Contents entries themselves?

    From what I can see, all Table of Contents entries are the same font, size, indentation and layout when the book is viewed in Portrait mode on an iPad. I have long subheadings in my Table of Contents, and they get truncated!
    How can I modify the style definition of the TOC entries themselves so that they will display in a smaller font size with less indenting, etc.?

    Modifying the TOC: http://support.apple.com/kb/PH2752?viewlocale=en_US
    Have you tried altering the style of the default items on the TOC page?

  • Find/Change Grep only finds one instance per paragraph, where am I going wrong?

    Hi,
    I've been using a Find/Change Grep to find any price with a comma and change that comma to a thin space (Newspaper's editorial style).
    But the Grep only finds the first instance of this per paragraph.
    Sample text...
    "$200,000 $200,000 $200,000.
    text at start of paragraph $200,000
    $200,000 text at end of paragraph
    tab     $200,000."
    In the sample the grep would miss the second and third price on the first line.
    I've been using...
    Find...
    (?<=\$)(\d{3})\,?(\d{3})
    also tried (\$\d{3})\,?(\d{3})
    Change to...
    $1~<$2
    Is there anything I can add to find these last two prices?
    I've been using this in combination with Batch Find Replace script, so different greps are set up for 5,6 and 7 digit numbers that start with $.
    Thanks.

    Try this,
    Find what: (?<=\x{0024})(\d{3})\,?(\d{3})
    Change to: $1~<$2
    Vandy

  • Find/Change words (with GREP) and apply a style...

    I need a Script for Find/Change words with GREP, and apply a paragraph style...
    Thanks...

    Hi Marcos,
    If you want the script to create character styles: Bold , Italic, Bold Italic, etc, and replace local formatting with these styles, use scripts in post #3.
    But if you want find and change words, or/and replace local formatting with styles defined by you, use FindChangeByList script.
    If the latter, I recommend you to download and install Record Find Change script (written by Martin Fisher).
    Then choose settings you need in Find-Change dialog – make sure they work as expected – and run Record Find Change script. A Notepad/TextEdit file will pop up with a line containing the recorded setting. Copy it, open FindChangeList.txt, delete the contents of this file and paste the line you just copied (or add it to the bottom of the file).
    Repeat the process for all find-change operations you need.
    Finally run FindChangeByList.jsx to make all changes in one go.
    However, while using Record Find Change script, you may encounter a problem: it doesn’t record paragraph and character styles placed inside a group. But you can write references to such styles like so:
    appliedParagraphStyle:app.activeDocument.paragraphStyleGroups.item("Style Group 1"). paragraphStyles.item("Paragraph Style 1")
    Kasyan

  • Script for running multiple find/change queries

    Working on a large ID book document (*.indb), I have saved several dozens of Find/Change Queries (named "col01", "col02" etc.) that I run on "All documents". For a particular reason I have to run these queries several times a day.
    So I was wondering whether there is, or whether anybody out there would write, a script that runs these queries one after the other. Given the size of the book, it might be necessary to provide for the script to pause after each query is run (before it goes on with the next), but I am just guessing.
    Any help is much appreciated!

    There are a couple of others:
    http://forums.adobe.com/message/5173943#5173943
    this is more at code level rather than a GUI, but the actual queries are made using the Find/Change dialog box.
    Also
    http://www.kahrel.plus.com/indesign/grep_query_manager.html
    This is good too, but only does GREP searches (no text, glyph or object find/replaces) that were written by the user - does not use the ones installed with InDesign. Does allow changes by selection, story, document or folder.
    Did try the Doquerylist suggested by Kasyan. This allows GREP/text changes by the user/installed with InDesign, but only applies to a selection or text-thread.
    Always good to have more than one way of accomplishing a task though!

  • How to use character styles in the Find/Change JavaScripts?

    First, good luck to Ole. He's been so helpful (and such a good writer, too). All the best!
    My Find/Change JavaScripts are running into trouble at line 159 of the ExtendScript Toolkit. The script is searching for a particular font, to which it should then apply a character style. I'm using the format I see in Adobe's "FindChangeList" sample text, but the script is still hitting a wall. What am I doing wrong? I'd like to have a working method for searching, not only for fonts, but also for finding a particular character or paragraph style and then applying a new style.
    Simple stuff, but I'm roadblocked.
    Here is the script so far:
    //This script applies the DFKai character style to the Arial Unicode font.
    text {findWhat:"", appliedFont:"Arial Unicode MS", fontStyle:"Regular"} {appliedCharacterStyle:"DFKai"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find Unicode font; change to DFKai character style.
    Thanks for your help!
    Gary Niemeier

    You are absolutely correct. I don't know how those spaces got there! I copied the text from the "FindChangeList.txt" document, but somewhere along the way, a software program "helpfully" added the spaces. (Rest assured, it wasn't copied from AppleScript. I stick with JavaScript.) Anyway, the script now runs like a charm.
    My thanks to you! Another "newbie" mistake easily spotted, eh?
    One thing, though, if Adobe is reading this: please flesh out the "FindChangeList.txt" file for those who are not programmers/scripters. I'm just a normal InDesign user, and I really need examples of basic syntax in order to use the "Find/Change" script correctly. I'm referring to the syntax involved with finding or changing text with a certain character or paragraph style. I often search for styles, and those properties should be provided in the help file. A couple of samples are all that's needed. (I did read through the JavaScript reference guide provided by Adobe, and even in the "Find/Change" section, it did not provide this information!). Furthermore, I often search text for a specific font. Why isn't this syntax included as well? It would easy to do and would save users a lot of fumbling around.
    Thanks again, all the best.

  • Reference saved query in Find/change script?

    I want to use the find change script included with InDesign but I want to reference my saved queries. The reference for this script doesn't explain how to do this but this seems like the best way to run several queries in a row.
    The Find Change script refrences a text document that tells it what to find and change.
    Thanks
    Jesse

    From the Help (with quite a lot of searching):
    b Application
    void loadFindChangeQuery (queryName: string, searchMode: SearchModes)
    Loads the specified find/change query.
    queryName string The query to load.
    searchMode SearchModes: TEXT_SEARCH
    GREP_SEARCH
    GLYPH_SEARCH
    OBJECT_SEARCH
    I sort of gathered it should be under Application, and so it was. And in hindsight, with a logical name as well! Didn't even know ID could do this.
    The ESTK2 does not supply code snippets, but I'm sure you can work it out from this :-)

Maybe you are looking for

  • Crawl Log Error: "The filename or extension is too long."

    Hello All, I get this error for some files on my SharePoint 2010 error log. The fix suggested here does not work as its for earlier versions of sharepoint 2010. I have verified the files in question have a title lenght of 120 characters and Name(Link

  • Actions at item level

    Hello. We are implementing the opportunity management scenario in CRM 5.0. We are using the action profile for the sales assistant. We would also like to triger the actions from the item level. I have found so far that no action profile can be assign

  • DMZ VLANs in the Data Centre - Physical or Logical Seperation

    I am building a new DMZ in my Data Centre and I'm looking at the merits of Logical Seperation rather than Physical Seperation. Instead of putting in some new DMZ Switches and then physically cabling all the DMZ devices and Servers to these switches s

  • Please tell me the way to access the object...........?

    when we are decleared a class variable,there should be an object in the memory.this object is the object of the java.obj.Class class............. my query is .. how to acess that object ? e.g. public class Basic public class Acsess{ Basic b;//now ple

  • Adobe Acrobat Pro for MAC

    I have been unable to download PDF's from trusted sites.  While the file downloads, it will not open and is listed as unreadable.  When I attempt to print to PDF docs are blank.  If I simply attempt to print certain files they are blank as well.  How