Re: script
Re: script
- Subject: Re: script
- From: Hans Haesler <email@hidden>
- Date: Fri, 7 Dec 2001 21:36:58 +0100
On Fri, 7 Dec 2001, Darren wrote:
>
I'm trying to edit my "Box overflow" script to process 16 pages. It seems
>
that it won't process anymore than 4 pages and stops. Also, once the script
>
has found a box that has text overflowing, how can the user identify that
>
box.
Darren,
each page must be shown and each box must be visible.
So, you need to set the view scale to 'fit page in window'.
Then loop through the pages and on each page through
the boxes.
The overflowing boxes are marked, by default, with the
little red crossed outline square. If this is not enough
you can set the color of the box to some color which
is not used in the document. The following snippet
uses "Yellow".
---
tell document 1 of application "QuarkXPress(tm) 4.11"
activate
set view scale to fit page in window
set countoflow to 0
repeat with i from 1 to count pages
show page i
do updates
tell page i
repeat with j from 1 to count text boxes
tell text box j
if box overflows then
set properties to {color:"Yellow", shade:50}
set countoflow to countoflow + 1
end if
end tell
end repeat
end tell
end repeat
display dialog "" & countoflow & " text boxes overflow."
end tell
---
Note: the 'do updates' is only necessary when you plan
to run your script from OSA Menu.
---
Hans Haesler <email@hidden>
References: | |
| >script (From: email@hidden) |