logo       

Re: Quark frustration: setting rule below on paragraphs: msg#00062

applescript-users

Subject: Re: Quark frustration: setting rule below on paragraphs

Hi.
Today i had the same problem. 
It seems that for a direct manipulation of paragraphs 
in a story a selection is needed.

The following code will work for me (10.4.11 / QXP 6.51 & 7.31 / PPC G4):


tell application "QuarkXPress Passport"
    tell document 1
        set theRef to a reference to last paragraph of story 1 of text box "name of the box"
        --set theRef to a reference to paragraph 6 of story 1 of text box "name of the box"
       select theRef
       tell theRef to set rule on of rule below to false
   end tell
end
 tell

Best regards,
Christian Sonntag 

forum.motions-media.de • www.qusa.de

P
 Think before you print!





  • SubjectQuark frustration: setting rule below on paragraphs
  • From: Jeff Jungblut <email@hidden>
  • Date: Thu, 27 Mar 2008 11:56:25 -0700
  • Delivered-to: email@hidden
  • Delivered-to: email@hidden
  • Thread-index: AciQPEFqf7ZEYvwvEdycTAARJH7xWA==
  • Thread-topic: Quark frustration: setting rule below on paragraphs
  • User-agent: Microsoft-Entourage/11.4.0.080122

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 (applescript-users@xxxxxxxxxxxxxxx)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/maillists%40codeha.us
Archives: http://lists.apple.com/archives/applescript-users

This email sent to maillists@xxxxxxxxx
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise