• 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: Adjusting height of textbox in Qxp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adjusting height of textbox in Qxp


  • Subject: Re: Adjusting height of textbox in Qxp
  • From: Hans Haesler <email@hidden>
  • Date: Thu, 25 Oct 2001 22:20:49 +0200

On Thu, 25 Oct 2001, Jeff Horton wrote:

>Is there a way to push up the bottom of a text box up to the last
>paragraph?

Jeff,

try this script. It works both ways, i.e. it expands a box which
is too tight and shrinks a box which is too "loose".
To speed up things there is a first rough approach in 10-pt steps.
Then, if necessary, there is a second go with 1-pt steps.
---
tell document 1 of application "QuarkXPress 4.11"
activate
tell current box
if box overflows is true then
repeat until box overflows is false
set height of bounds to (((height of bounds as point units) as real) + 10) as point units
do updates
end repeat
else
repeat until box overflows is true
set height of bounds to (((height of bounds as point units) as real) - 10) as point units
do updates
end repeat
set height of bounds to (((height of bounds as point units) as real) + 10) as point units
do updates
end if
if box overflows is true then
repeat until box overflows is false
set height of bounds to (((height of bounds as point units) as real) + 1) as point units
do updates
end repeat
else
repeat until box overflows is true
set height of bounds to (((height of bounds as point units) as real) - 1) as point units
do updates
end repeat
set height of bounds to (((height of bounds as point units) as real) + 1) as point units
do updates
end if
end tell
end tell
---
Please unwrap the long lines, if necessary (I've unchecked
'word-wrap' before pasting the code).

Note: the 'do updates' are not needed, unless you want to
to run the script from OSA Menu.

Regards,

Hans

---
Hans Haesler <email@hidden>


  • Prev by Date: Re: any way to tell if a script has a 'return' statement?
  • Next by Date: Wanted: Applescript syslog server (receiver)
  • Previous by thread: Re: Adjusting height of textbox in Qxp
  • Next by thread: Re: Adjusting height of textbox in Qxp
  • Index(es):
    • Date
    • Thread