• 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: Select every text box w/black text(Quark)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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>


References: 
 >Select every text box w/black text(Quark) (From: "marty brandt" <email@hidden>)

  • Prev by Date: RE: Droplet for CD
  • Next by Date: RE: Stepping through a found set in FileMaker Pro
  • Previous by thread: Select every text box w/black text(Quark)
  • Next by thread: Poll: best and worst applescript support
  • Index(es):
    • Date
    • Thread