Re: Select every text box w/black text(Quark)
Re: Select every text box w/black text(Quark)
- Subject: Re: Select every text box w/black text(Quark)
- From: Hans Haesler <email@hidden>
- Date: Wed, 19 Sep 2001 23:00:06 +0200
On Wed, 19 Sep 2001, marty brandt wrote:
>
Im trying to script a Select every text box with black text.
>
Can I get some help?
Yes :-), but you don't give enough details. When the boxes contain
either black text or colored text then this will work...
---
tell document 1 of application "QuarkXPress 4.11"
set tool mode to drag mode
set selected of every text box whose name of color of every text = "Black" to true
end tell
---
... but empty boxes, whose cursor is "Black", will be selected, too.
And it will fail when the black text is not at the beginning of the story.
Both problems can be eliminated with a repeat loop:
---
tell document 1 of application "QuarkXPress 4.11"
activate
set tool mode to drag mode
repeat with i from 1 to count text box
tell text box i
repeat with j from 1 to count text style range
try
if name of color of text style range j = "Black" then
set selected to true
exit repeat
end if
on error
end try
end repeat
end tell
end repeat
end tell
---
Run this snipppet from OSA Menu, then it'll be fast enough.
Regards,
Hans
---
Hans Haesler <email@hidden>