• 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: script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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)

  • Prev by Date: Re: Duplicate with replacing and a full trash
  • Next by Date: Re: Do I need a newer version of Applescript (was Re: interesting discovery)
  • Previous by thread: script
  • Next by thread: script
  • Index(es):
    • Date
    • Thread