Selecting Text Box by Bounds in Quark

Bounds are weird. Despite their looks, they’re not lists. To get at individual items, you’ll have to coerce it to a list.

Operating in points for these kinds of operations will save you some grief, since the conversions Quark does can be unpredictable.

Try something like the following:

 set bnds to {"720 pt", "-7.2 pt", "792 pt", "7.2 pt"} as list 

 repeat with myItem from 1 to count of bnds 
 set item myItem of bnds to item myItem of bnds 
 end repeat 

 tell application "QuarkXPress™ 4.11" 
 tell document 1 
 tell page 1 
 repeat with x from 1 to (count of text boxes) 
 set {theY, theX, the2ndY, the2ndX} to (bounds of text box x) as list 
 -- coerce to real 
 if ((theY) as real) = (720) then 
 display dialog "The first Y matches." 
 end if 
 -- coerce to text 
 if (theX as text) = (item 2 of bnds) then 
 display dialog "The first X matches." 
 end if 
 end repeat 
 end tell 
 end tell 
 end tell 

Luck,

–tet