Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Locating styles with FindChangeByList

Return to Member Forum

  • Author
    Posts
    • #76526
      Chris Court
      Member

      Easy one for you scripting geniuses,

      I’m working on a custom list for the above script to fix some of the common text issues we encounter in copy coming from our writers and wire stories. Everything was working peachy until I came to the following puzzler:

      I want to change the paragraph style of a certain set of text patterns. Everything works fine if the required style is sitting in the root of the style palette, however I can’t work out how to point the script at the style if it is located in a style group.

      The offending line is of the form:
      //grep {findWhat:”(Smith|Jones|Thompson)”} {appliedParagraphStyle:”TX Byline”} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Ensures correct style for bylines.

      The paragraph style is called “TX Byline”, and it is located in a style group named “Body Text Styles”

      I’ve tried
      {appliedParagraphStyle:”TX Byline (Body Text Styles)”}
      {appliedParagraphStyle:”TX Byline(Body Text Styles)”}
      {appliedParagraphStyle:”Body Text Styles/TX Byline”}
      {appliedParagraphStyle:”Body Text Styles\TX Byline”}
      {appliedParagraphStyle:”Body Text Styles:TX Byline”}

      …all of which give me javascript errors.

      I’m sure it’s a simple fix, but I’m afraid I’m just not familiar enough with the syntax to guess at it. Any help would be appreciated.

      Thanks!
      Chris

    • #76550
      David Blatner
      Keymaster
    • #76572
      Chris Court
      Member

      Thanks so much, David!

      The syntax on the page you linked to worked a charm… although I did have to change a couple of smart quotes to dumb quotes before the script recognised it.

      Chris

Viewing 2 reply threads
  • You must be logged in to reply to this topic.
Forum Ads