RE: Quark
RE: Quark
- Subject: RE: Quark
- From: Jason Toews <email@hidden>
- Date: Fri, 3 Aug 2001 07:42:12 -0700
We had a similar problem here at my office. I eventually did something like
the following snippet. It loops through all pages in the document. On each
page, it looks for all selected boxes. If any are found, the handler that
processes those boxes is called. In my experience, it seems that addressing
"every generic box of page X" works better than "every generic box of
current page". Since it is apparently not possible to select items across
more than two pages, you could put in some code to exit gracefully after the
handler has been called twice... Hope this helps. As always, beware the
line breaks.
=============================
tell application "QuarkXPress(tm) 4.11"
tell document 1
repeat with thisPage from (index of page 1) to (index of page -1)
try
set theBoxes to (object reference of every generic box of page thisPage whose
selected is true)
if class of theBoxes is not list then set theBoxes to {theBoxes}
my processBoxes(thisPage, theBoxes)
on error
set theBoxes to {}
end try
end repeat
end tell
end tell
on processBoxes(thisPage, theBoxes)
tell application "QuarkXPress(tm) 4.11"
tell document 1
show page thisPage
repeat with thisBox in theBoxes
--put box processing code here
end repeat
end tell
end tell
end processBoxes
=============================
jason toews
>
----------
>
From: Hans Haesler
>
Sent: Thursday, August 2, 2001 12:25 AM
>
To: AS lists
>
Subject: Re: Quark
>
>
On Thu, 02 Aug 2001, Shane Stanley wrote:
>
>
>tell application "QuarkXPress 4.11"
>
> tell document 1
>
> tell current page
>
> set theBoxes to name of every picture box whose selected is true
>
>
This works fine when all selected boxes are on the _same_ page (which
>
must be the current one, but this is another story...).
>
<snip>