• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Quark frustration: setting rule below on paragraphs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quark frustration: setting rule below on paragraphs


  • Subject: Quark frustration: setting rule below on paragraphs
  • From: Jeff Jungblut <email@hidden>
  • Date: Thu, 27 Mar 2008 11:56:25 -0700
  • Thread-topic: Quark frustration: setting rule below on paragraphs

Title: Quark frustration: setting rule below on paragraphs
I’m trying to write a script that will turn on the rule below on every paragraph in a story except those paragraphs which are headings (style name is “Glance”) or which are empty spacer paragraphs (length < 3).  The following code should enable the rule below for all paragraphs, then turn it off for heading and blank paragraphs, but for some reason the code affects only selected paragraphs in the story, not the whole story. It also seems to be ignoring whether or not the whose conditions (heading or blank) are being met. So the script in effect turns on the rule below for every selected paragraph, then turns it off, leaving the document in the state it was in before the script was run. (If I comment out the last two tell blocks with the whose clauses, then the script applies rule below to every selected paragraph, not all paragraphs.)

tell application "QuarkXPress"
    tell document 1
        tell story 1 of current box
           
            tell every paragraph
               set rule on of rule below to true
               set position of rule below to "50%"
                set width of rule below to "0.4 pt"
            end tell
           
            -- turn off rule on headings styled "Glance"
           tell (every paragraph whose style sheet is "Glance")
                set rule on of rule below to false
           end tell
           
            -- turn off rule on blank paras
           tell (every paragraph whose length is less than 3)
                set rule on of rule below to false
           end tell
           
        end tell
   end tell
end
tell

So my question is, am I doing something wrong here?? Why is Quark ignoring the whose clause?  (I haven’t had that problem before.)
Why does it affect only selected paragraphs??

I tried running it in a repeat loop, doing one paragraph at a time, but it still had the same effect of turning on the rule below for every paragraph in the story ... Each time through the loop ... 135 times for every paragraph in the story.

Help!! What am I missing??


--
Jeff Jungblut
email@hidden
Senior Graphic Designer & Web Developer
Uptown Publications
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: reading a file in an applescript.
  • Next by Date: Re: keep dialog open beyond time out
  • Previous by thread: Re: keep dialog open beyond time out
  • Next by thread: iTunes: Why can't I get properties.
  • Index(es):
    • Date
    • Thread