Hi All,
I am writing a script to move all boxes and lines from one page to its previous page. (For example from page 3 to page 2)
Here What I want is, If box “A” is placed at infront of box “B”, then the same appearence should come after the boxes are moved to previous page.
I had written a script to move the boxes to previous page. It works fine. But the problem is, the appearance is not same after the boxes are moved. The boxes are interchanged after moved.
My script is:
property y1 : {}
property bds : {}
tell application "QuarkXPress"
tell front document
set horizontal measure to points
set vertical measure to points
set page rule origin to {"0 pt", "0 pt"}
repeat with pagecount from 2 to count of pages
try
set allboxes to uniqueID of every generic box of page pagecount
if pagecount mod 2 is equal to 0 then
repeat with eveni in allboxes
set y1 to ""
set bds to bounds of generic box id eveni as list
set item 2 of bds to (((item 2 of bds as real) + 24)) as string
set item 4 of bds to (((item 4 of bds as real) + 24)) as string
set y1 to (move generic box id eveni to beginning of page (pagecount - 1))
set bounds of generic box id eveni to bds
-------------------------------------------------------------------------------------------------------------------
--////// Here I want to set the box position same as its previous position ////////
--------------------------------------------------------------------------------------------------------------------
end repeat
else if pagecount mod 2 is equal to 1 then
repeat with oddbox in allboxes
set y1 to ""
set bds to bounds of generic box id oddbox as list
set item 2 of bds to (((item 2 of bds as real) - 24)) as string
set item 4 of bds to (((item 4 of bds as real) - 24)) as string
set y1 to (move generic box id oddbox to beginning of page (pagecount - 1))
set bounds of generic box id oddbox to bds
-------------------------------------------------------------------------------------------------------------------
--////// Here I want to set the box position same as its previous position ////////
--------------------------------------------------------------------------------------------------------------------
end repeat
end if
end try
end repeat
end tell
end tell
Could any one help me how to do this.
Thanks,
Gopal