in

Quark Forums

how to apply character style to contents in the textframe.

Last post 11-05-2009 2:25 AM by Emma. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-03-2009 11:32 PM

    • prabu
    • Top 150 Contributor
    • Joined on 06-04-2009
    • Chennai
    • Posts 64

    how to apply character style to contents in the textframe.

      set style sheet of paragraph 1 of  selection to H1

    using this above script, i have applied para style to the selection.

    how to apply characterstyle to the selection range? 

     

     

    Regards
    Prabu
  • 11-04-2009 2:17 AM In reply to

    • Emma
    • Top 10 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,184

    Re: how to apply character style to contents in the textframe.

     Try this:

            set character style of paragraph 1 of selection to "H2"
     

  • 11-04-2009 11:03 PM In reply to

    • prabu
    • Top 150 Contributor
    • Joined on 06-04-2009
    • Chennai
    • Posts 64

    Re: how to apply character style to contents in the textframe.

     Tried. But not working.

    Regards
    Prabu
  • 11-05-2009 2:25 AM In reply to

    • Emma
    • Top 10 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,184

    Re: how to apply character style to contents in the textframe.

     Perhaps there is local formatting that you need to override? Try this:

     set character style of paragraph 1 of selection to null
        set character style of paragraph 1 of selection to "H2"

    Then there are questions such as: Have you actually selected the type? Applying to selection is not always a good idea, you might be better using :

     tell story 1 of text box 1

    set character style of paragraph 1 to null
        set character style of paragraph 1 to "H2"

    end tell

     In general, saying something 'doesn't work' isn't very helpful - try and describe as clearly as you can exactly what happens. If nothing happens at all, try varying the script a little so you can fathom what isn't working. Try inserting little 'display dialogs' to let you know where the script has got to.

     

Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems