Re: New Quark 3.3x spreads
Re: New Quark 3.3x spreads
- Subject: Re: New Quark 3.3x spreads
- From: Hans Haesler <email@hidden>
- Date: Sat, 21 Jul 2001 17:49:46 +0200
On Sat, 21 Jul 2001, Timothy Fink wrote:
>
When I script the creation of a new spread in QXP 3.3x on a document with
>
master elements, the master elements do not carry over to the new spread and
>
it is blank.
With QXP 3.32 you must test, first, if the last page is an odd or an
even one. Then you either make a *page* (where you get the Master elements)
or you make a *spread* and you must set the properties of the new page to
the corresponding spread:
---
tell document 1 of application "QuarkXPress"
if ((name of page -1 as text) as integer) mod 2 = 0 then
make page at end
else
make spread at end
set properties of page -1 to {master spread:spread 1 of master document 1 of application "QuarkXPress"}
end if
end tell
---
Here are the chronological results of the second line (let's say the
number of the last page is 23):
(name of page -1 as text) --> "23"
((name of page -1 as text) as integer) --> 23
((name of page -1 as text) as integer) mod 2 --> 1
Using the operator 'mod' (or mdulus or modulo) returns the remainder of
the division of a number by the given value. This means that the rest of
(page number / 2) = 1
So the last page is an odd one and we must make a new spread.
Hope this works.
Regards,
Hans
---
Hans Haesler | email@hidden