Page 1 of 1

Is there a script for this?

Posted: 28 Aug 2014, 18:16
by cls
The CEO of our company insists on laying out our catalogs in single page format so he can rearrange the pages at will.

The end result is that we never know whether a page will be on the left or right and since our catalogs are thick and perfect bound
images and type often end up in the gutter.

Is there a quick and easy way to move all the odd number pages 1/4" to 1/2" to the left and all even number pages 1/4" to 1/2" to the right
and get that stuff out of the gutter? We're talking about 400 pages, so manually moving them one by one is frightening...

Any help you can give me would be greatly appreciated.

Re: Is there a script for this?

Posted: 29 Aug 2014, 00:02
by Sarbjit Singh
Can you post some ScreenShots / Videos of what you are trying to achieve. Better still send us a sample document.

you may send me a PM with the details.

Re: Is there a script for this?

Posted: 29 Aug 2014, 02:30
by Jean-Marie Schwartz
cls wrote:The CEO of our company insists on laying out our catalogs in single page format so he can rearrange the pages at will.

The end result is that we never know whether a page will be on the left or right and since our catalogs are thick and perfect bound
images and type often end up in the gutter.

Is there a quick and easy way to move all the odd number pages 1/4" to 1/2" to the left and all even number pages 1/4" to 1/2" to the right
and get that stuff out of the gutter? We're talking about 400 pages, so manually moving them one by one is frightening...

Any help you can give me would be greatly appreciated.
I wrote one similar script a couple months ago. I don't know if it'll really match your needs but certainly worth a try. It will act on every single page! So if you ever have some pages where all the elements are already in place, they will move anyway! Nite that you can enter negative values in order to move the elements the opposite way. Feel free to report any trouble.
Here is the code:

Code: Select all

set the_amount to text returned of (display dialog "Please enter the amount? (in inches)" default answer "0.25")
try
	set the_amount to the_amount as real
on error
	beep 3
	display dialog "Only digits please!" with icon caution giving up after 3
	return
end try

tell application "QuarkXPress"
	tell document 1
		set CP to count of pages
		repeat with i from 1 to CP by 2 -- odd pages, so right-hand, every elements will move say 0.25" to the right : {T, L, B, R} => {T, L+0.25", B, R+0.25"}
			my MoveItems(i, the_amount)
		end repeat
		repeat with j from 2 to CP by 2
			my MoveItems(j, -the_amount)
		end repeat
	end tell
end tell

beep 2

on MoveItems(page_number, amount)
	tell application "QuarkXPress"
		tell document 1
			tell page page_number
				repeat with k from 1 to count of generic box
					set the_bounds to bounds of generic box k
					set {T, L, B, R} to (coerce the_bounds to list)
					set T to (coerce T to real)
					set L to (coerce L to real)
					set B to (coerce B to real)
					set R to (coerce R to real)
					set bounds of generic box k to {T, (L + amount), B, (R + amount)}
				end repeat
			end tell
		end tell
	end tell
end MoveItems
EDIT: I've tried to adapt my code to your willings (measures in inches) + translated some indications that remained in French. Give this code a shot and tell me wether it works.