1 Reply Latest reply on Feb 24, 2012 1:57 AM by Muppet Mark

    [AS] How to change a paragraph style within any folder in Find Grep?

    cuepub

      I want to change both text and paragraph style

       

      I do that job very easily until I put paragraph styles in a folder

       

      How to express the paragraph style "passage" within the folder "1st" in AppleScript?

       

      In line 18 below, "1st:passage" may be wrong... so I've tried and search for an hour, but I can't get the answer..

       

      sorry for bad english

       

       

       

      my main()

      on main()

        mySnippet_test()

        myTeardown()

      end main

      on mySnippet_test()

                tell application "Adobe InDesign CS5.5"

                          set myDocument to document 1

                          set find grep preferences to nothing

                          set change grep preferences to nothing

                          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

                          set find what of find grep preferences to "\\n"

                          set change to of change grep preferences to "\\r"

                          set applied paragraph style of change grep preferences to "1st:passage"

                          tell myDocument

        change grep

                          end tell

        --Clear the find/change preferences after the search.

                          set find grep preferences to nothing

                          set change grep preferences to nothing

                end tell

      end mySnippet_test

      on myTeardown()

      end myTeardown