in

Quark Forums

deleting and replacing style spec

Last post 11-04-2009 12:50 PM by Goar. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-03-2009 6:02 AM

    • Goar
    • Not Ranked
    • Joined on 11-24-2005
    • Paderborn, GER
    • Posts 16

    deleting and replacing style spec

    Hi, I would like to delete a style spec replacing it by another one.

    Is ist possible with AppleScript as it is possible by hand?

     

    Goar
    ---
    > Dual 2 GHz PowerPC G5, Mac OS 10.4.11, QXP Passport 7.5 <
  • 11-03-2009 8:02 AM In reply to

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

    Re: deleting and replacing style spec

     There isn't the same quick and easy option. You would have to get a reference to everything styled with the orignal, apply the new one, then delete the original. This is a VERY rough and ready bit of AS that does it:

     

    tell document 1 of application "QuarkXPress"
         set to_change to object reference of text style ranges of every story whose paragraph style is "Bullets"
         repeat with text_chunk in to_change
              set paragraph style of text_chunk to "Highlights Base"
         end repeat
    end tell


    -------------------------
    [This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

     

    Note that this won't override any local styling (like option-clicking on a style). That can be done, you'd have to add a line to apply 'no style' I guess, but I haven't time to play with it right  now!

  • 11-04-2009 12:50 PM In reply to

    • Goar
    • Not Ranked
    • Joined on 11-24-2005
    • Paderborn, GER
    • Posts 16

    Re: deleting and replacing style spec

     Thanks, Emma, for snippet and comments.

    It helped.

    Goar
    ---
    > Dual 2 GHz PowerPC G5, Mac OS 10.4.11, QXP Passport 7.5 <
Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems