Re: Quark-bold uppercase paragraphs
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