Re: Adjusting height of textbox in Qxp
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>