Hello
This is section of script is intended to insert a line on a Quark document and then step and repeat it (the number of repeats and the offsets being calculated variables).
tell application "QuarkXPress"
tell front document
tell current page
set numberofcompanies to 25
set CompLeadingMM to 5
set v_offset to CompLeadingMM
set h_offset to 0
make line box at beginning with properties {bounds:{59.0, 11.4, 59.0, 212.0}, width:0, name:"1stDivider"}
repeat with i from 1 to (numberofcompanies - 2)
duplicate line box "1stDivider" to beginning
tell line box "1stDivider"
set {FD_VS, FD_HS, FD_VE, FD_HE} to bounds as list
set FD_VS to FD_VS as number
set FD_HS to FD_HS as number
set FD_VE to FD_VE as number
set FD_HE to FD_HE as number
set bounds to {FD_VS + v_offset, FD_HS, FD_VE + v_offset, FD_HE}
end tell
end repeat
end tell
end tell
end tell
It works fine, except that the Y1 and Y2 points of the duplicated lines drift apart when they should remain the same for each line (giving a level line).
For example, if I duplicate the first line (Y1 - 59mm, Y2 - 59mm) once by 5mm the resulting line has a Y1 figure of 63.995mm and the Y2 of 64.004mm. It seems to be bracketing my desired result (59 + 5 = 64mm). The drift increase with every duplicated line.
Any ideas where I’m going wrong or what I’m not coercing properly.
Thanks in advance
Mark
[Quark 6.5
OS X 10.4.8]