Re: h and j spec
Re: h and j spec
- Subject: Re: h and j spec
- From: Hans Haesler <email@hidden>
- Date: Wed, 16 Jan 2002 23:27:27 +0100
On Wed, 16 Jan 2002, John Romanski wrote:
>
having done some applescripting for quark at the time of the launch of 4.0,
>
is it possible that the h and j are not a setable property in 3.32, but only
>
"getable"?
With QXP 3.32 the properties _are_ setable (the read-only
ones excepted, e.g. 'index'). But you can't make, duplicate
or delete a 'h and j' spec.
Here is a workaround. The script expects two XPress documents.
Document 1 -- the source document -- must have two (or more)
H&J specs. The variable 'tmpName' is set to the name of the
second H&J spec, a text box is created on document 1, the
H&J spec 'tmpName' is applied to the paragraph 1, the box is
copied to document 2, both boxes are deleted.
Finally, in the second document, the H&J spec 'tmpName' can be
modified: name, auto hyphenation, smallest word and so on.
---
tell application "QuarkXPress"
tell document 1
set tmpName to name of h and j spec 2
tell page 1
make text box at beginning
tell text box 1
tell paragraph 1
set h and j set to tmpName
end tell
end tell
copy text box 1 to beginning of document 2 of application "QuarkXPress"
end tell
delete text box 1
end tell
tell document 2
delete text box 1
set properties of h and j spec tmpName to {name:"Alberto", auto hyphenation:true, smallest word:5, minimum after:2, minimum before:2, break capitalized words:true, hyphens in a row:0, hyphenation zone:0, space justification:{minimum:60, optimum:100, maximum:200}, character justification:{maximum:0, minimum:0, optimum:0}, single word justify:false, flush zone:3}
end tell
end tell
---
Note: the setting of the properties is one long line.
Note 2: Gil Poulsen is right. With QXP 4.11 you can create
the new H&J spec directly.
---
Hans Haesler <email@hidden>