0 Replies Latest reply on Apr 6, 2015 6:26 PM by TheOaksMan

    Referencing a selected InDesign text frame in applescript?


      In Applescript, I can use "set myStory to back story of myDocument" or "set myStory to front story of myDocument"

      However, I would like to use "set myStory to selected story of myDocument"


      How would I reference a selected story frame in order to apply a paragraph style to all text in the story?


      tell application "Adobe InDesign CS6"

           set myDocument to active document

           tell myDocument

                set myStory to back story of myDocument -- WOULD LIKE TO SAY set myStory to selection of myDocument but it doesn't work

                set myParagraphStyle to paragraph style "Body Text"

                tell text of myStory

                     apply paragraph style using myParagraphStyle

                end tell

           end tell

      end tell


      Thanks for your time and assistance.