in

Quark Forums

how to set new name to existing style??

Last post 08-21-2009 6:23 by Sankar. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-07-2008 8:03

    how to set new name to existing style??

    hi....im able to set a name to style spec using the following code..

    set name of style spec "chap_bm" to "CHAP"

    but if i take the list of style spec in a variable and assign that variable it is not working..

    set paralist to name of every style spec
    repeat with i from 1 to count of items in paralist
    set mylist to item i of paralist as string
    set name of style spec mylist to replacelist
    end repeat

    Here replacelist is the variable containing the list of styles.This is not working..please help me..


    Thanks,
    poovili.
  • 05-07-2008 10:07 In reply to

    • Sankar
    • Top 150 Contributor
    • Joined on 05-06-2008
    • India
    • Posts 80

    how to set new name to existing style??

    Hi,

    just replace the fourth line as

    set name of style spec mylist to item i of replacelist

    ...
    San
  • 05-07-2008 11:08 In reply to

    how to set new name to existing style??

    hi.. i cant able to set the name of style sheet using your code..

    set name of style spec mystylename to "H1"

    it's working.. but

    set myvar to "H4"

    set name of style spec mystylename to myvar

    it's not working..
  • 05-08-2008 5:35 In reply to

    how to set new name to existing style??

    Hi,

    Try the below code. Here, usually can't change the Normal style name. It is first name when you the style spec. So keep it's name as it is and change the remaining.

    Start the loop also from 2....

    tell application "QuarkXPress"
    set replacelist to {"Normal", "vaasu", "vaasu1", "vaasu2"} as list
    tell document 1
    set paralist to name of every style spec
    repeat with i from 2 to count of items in paralist
    set mylist to item i of paralist
    set name of style spec mylist to item i of replacelist
    end repeat
    end tell
    end tell


    Let me know, is it working....


    Vaasu
    Thanks,
    Vasanthi
    HOV Services Ltd., Chennai, India.
  • 08-21-2009 6:23 In reply to

    • Sankar
    • Top 150 Contributor
    • Joined on 05-06-2008
    • India
    • Posts 80

    Re: how to set new name to existing style??

    hi vasanthi,

    While i check the same its throws error as "This Property is not editable". Is it possible to set the existing name to new one.

    hi Povili,

    r u got this...

    San.....
Page 1 of 1 (5 items)
Powered by Community Server (Commercial Edition), by Telligent Systems