5 Replies Latest reply on Jan 31, 2011 7:36 PM by brifilone

    [mac OS/AS] how do I apply a paragraph style using applescript?

    brifilone

      I got the new way to talk to a labeled text box down but can't seem to figure out how to word it to apply a paragraph style

       

      set AttGet to "Try to put this text in"

       

      tell application "Adobe InDesign CS2"

      activate

      tell document 1

      set contents of text frame 1 whose label is "Attention getter" to AttGet --YES

      --here is how we used to do it in earlier CS versions (CS2 & 3)

      set applied paragraph style of every paragraph of parent story of text frame "Attention getter" to "Paragraph Style X"

      -- that errors so i tried these to no avail!
      --set applied paragraph style of every paragraph of parent story of text frame 1 whose label is "Attention getter" to "Paragraph Style X"--FAILS

      --set applied paragraph style of contents of text frame 1 whose label is "Attention getter" to "Paragraph Style X" --FAILS

      -- set applied paragraph style of text of text frame 1 whose label is "Attention getter" to "Paragraph Style X" --FAILS

      end tell

      end tell