6 Replies Latest reply on Jan 22, 2010 12:54 AM by seb400

    Correct syntax? - FindChangeByList

    seb400 Level 1

      CS4, Mac OSX 10.5.8

       

      Hi

      I've been wrestling my way through a personalised FindChangeByList.

       

      Ive managed to achieve most of what I'd like to, but I'm unable to incorporate a couple of items that I have been able to format using GREP Find/Change.

       

      I receive a Word file, to format in InDesign which has 'locally' styled bullleted and numbered lists.

      I can find and replace both of these using GREP Find/Change by using "+ list: bulleted" and + list: numbered" in the "Find Format:" but have been unable to work out how to specify these in the FindChangeByList....

       

      Could someone point me in the right direction please?

       

      below is an example of part of my  'FindChangeByList', acheived with help from this forum, but I'm not skillful enough to identify/describe the above.

       

       

      grep    {findWhat:"(.+)", appliedParagraphStyle: app.activeDocument.paragraphStyles.item("Normal") }    {changeTo:"$1", appliedParagraphStyle: app.activeDocument.paragraphStyleGroups.item("Main text").paragraphStyles.item("Body text 10/12 SwissLtBt - Standard") }    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true}

       

      MTIA Steve

        • 1. Re: Correct syntax? - FindChangeByList
          Roy McCoy Level 1

          There's likely a way to do what you want directly, but if nobody 

          provides you with it and you can't find it yourself, I'd say try going 

          for a fiddle - i.e. change temporarily to something you can handle 

          that does work, and then change back after you've done your 

          manipulation. You may well get a more intelligent and helpful reply 

          than this, but good luck in any event.

           

          Roy

          • 2. Re: Correct syntax? - FindChangeByList
            L. Tournier Level 3

            Hello,

             

            You can use this script, RecordFindChange : « It was written by Martin Fisher, and works by translating your current Find/Change settings to a text file, perfectly formatted for use with FindChangeByList. All you have to do is set up the Find/Change dialog box with the options you want, and run the script. Then you copy and paste the results into the text file you wish to use with FindChangeByList » (Mike Rankin, InDesignSecrets) http://indesignsecrets.com/find-change-scripting-goodness.php

             


            1 person found this helpful
            • 3. Re: Correct syntax? - FindChangeByList
              Kasyan Servetsky Level 5

              To find Numbered list use:

              {bulletsAndNumberingListType:ListType.NUMBERED_LIST}

              and to find Bullet list use:

              {bulletsAndNumberingListType:ListType.BULLET_LIST}

               

              Kasyan

              • 4. Re: Correct syntax? - FindChangeByList
                seb400 Level 1

                Thanks guys,

                 

                L. - I'd forgotten about that script/function - was able to pick out what I needed to great effect.

                 

                Kaysan - my lack of knowledge let me down with your string I'm afraid - it told me that what I was asking for was 'undefined' but I guess I didn't apply it correctly. The method above gave me a number for bullets (ListType:1280598644)

                 

                grep    {bulletsAndNumberingListType:1280598644}    {appliedParagraphStyle: app.activeDocument.paragraphStyleGroups.item("Lists").paragraphStyles.item("Bullets 10/12") }    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true}

                 

                 

                 

                Steve

                • 5. Re: Correct syntax? - FindChangeByList
                  Kasyan Servetsky Level 5

                  Steve,

                   

                  bulletsAndNumberingListType:1280598644

                  and

                  bulletsAndNumberingListType:ListType.BULLET_LIST

                  are both identical.

                   

                  1280598644 is called enumeration, that's what RecordFindChangescript returns.

                  Before posting on the forum I tested these two lines on my home computer (CS3, Win) and it worked for me.

                   

                  Kasyan

                  • 6. Re: Correct syntax? - FindChangeByList
                    seb400 Level 1

                    Hi Kaysan

                    I knew it was me, but I don't know why? Tried it again this morning and it worked fine.

                    I think that I may have mistakenly pasted the BULLET_LIST  'find' into the NUMBERED_LIST search and vice versa

                     

                    Steve