5 Replies Latest reply on Oct 20, 2010 8:00 AM by Kasyan Servetsky

    FindChangeByList script question, re: when a style is part of a style group

    JoJo Jenkins Level 1

      Hi,

       

      I'm using InDesign's FindChangeByList script and am running into a problem.

       

      Here is the problem line:

       

      grep {findWhat:"^."} {appliedParagraphStyle:app.activeDocument.paragraphStyleGroups.item("Text").paragraphStyles.item("Body2.TextIndent"), changeConditionsMode:1919250519} {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true} //Change everything to Text.indent2 style

       

      What I am trying to do is format every paragraph with the style called "Body2.TextIndent" which is located in my style sheets under a group called "Text"

       

      This line is not working for me; I get a JavaScript  "Error #17. Error string: variable name expected."

       

      Please note that I CAN get this line to work just fine if I use a style that is NOT in a group. For instance, this line works fine for me:

       

      grep {findWhat:"^."} {appliedParagraphStyle:"Body2.TextIndent", changeConditionsMode:1919250519} {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true} //Change everything to Text.indent2 style

       

      The problem is apparently that the FindChangeByList script doesn't like style groups. I found this by Googling the internet and found this link:

       

      http://www.listsearch.com/indesign/Thread/index.lasso?17986

       

      Can anyone help?

       

      Thanks.