Anyone know how I can step down the horizontal scale on a paragraph until it reaches the required 1 line.
Thanks in advance.
tell application "QuarkXPress™ 4.11"
activate
tell document 1
tell current box
set contents of paragraph 1 of story 1 of it to "A very long line"
set size of paragraph 1 of story 1 to 36
if (count of lines of paragraph 1 of story 1) > 1 then
set horizontal scale of paragraph 1 of story 1 to 100
end if
end tell
end tell
end tell
Hi…
Here you are one posibility :
tell application "QuarkXPress? 4.11"
activate
tell document 1
tell current box
set paragraph 1 of story 1 to "A very long line"
tell paragraph 1 of story 1
set size to 36
set TxtScaleOrig to (horizontal scale) as text -->"100%"
set TxtScale to (text 1 thru -2 of TxtScaleOrig) as number -->100
repeat
if (count of lines) > 1 then
set TxtScale to TxtScale - 5
set horizontal scale to TxtScale
else
exit repeat
end if
end repeat
end tell
end tell
end tell
end tell
Enjoy 