• 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
Re: Quark-bold uppercase paragraphs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quark-bold uppercase paragraphs


  • Subject: Re: Quark-bold uppercase paragraphs
  • From: Shane Stanley <email@hidden>
  • Date: Mon, 13 Aug 2001 09:18:32 +1000

On 13/8/01 2:06 AM +1000, Jeremy Sellors, email@hidden, wrote:

> Well this works in most cases, since I can't figure out how to test if a
> paragraph is mostly uppercase.
> How do I suspend screen updates as the script runs so that just the finished
> text gets updated?
> tell application "QuarkXPress 4.11"
> activate
> tell document 1
> tell story 1 of automatic text box
> set style of every paragraph to plain
> set paraCou to count of paragraphs
> try
> repeat with i from 1 to paraCou
> if ((count of characters of paragraph i) > 1) then
> delete paragraph i
> end if
> end repeat
> end try
> try
> repeat with i from 1 to paraCou
> if ((count of characters of paragraph i) > 40) then
> set style of paragraph i to "bold"
> end if
> end repeat
> end try
> end tell
> end tell
> end tell

You don't need to loop through the paragraphs -- try something like this:

tell application "QuarkXPress 4.11"
tell document 1
tell story 1 of text box 1
set style to plain
delete (every paragraph where character 1 = return)
set style of every paragraph whose length > 40 to bold
end tell
end tell
end tell

--
Shane Stanley, email@hidden


References: 
 >Quark-bold uppercase paragraphs (From: Jeremy Sellors <email@hidden>)

  • Prev by Date: Re: Disabling mouse while script runs
  • Next by Date: Re: Akua Sweets and Writing long version resource?
  • Previous by thread: Quark-bold uppercase paragraphs
  • Next by thread: facespan and reference usage/errors
  • Index(es):
    • Date
    • Thread