Is there a script for this?

Discuss AppleScripting for QuarkXPress 10, 9 & 8 (and before)

Is there a script for this?

Postby cls » 28 Aug 2014, 18:16

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.
cls
 
Posts: 2
Joined: 28 Aug 2014, 17:53

Re: Is there a script for this?

Postby Sarbjit Singh » 29 Aug 2014, 00:02

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.
Image
User avatar
Sarbjit Singh
Quarkian
Quarkian
 
Posts: 924
Joined: 22 Jan 2009, 04:44
Location: India

Re: Is there a script for this?

Postby Jean-Marie Schwartz » 29 Aug 2014, 02:30

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.
Jean-Marie Schwartz

= Mac Pro Quad-Core Intel 2.8 GHz • 10 Go 1066 MHz DDR3 • Mac OS 10.10.5 • QuarkXPress 9.5.4.1 + QuarkXPress 2017 • Adobe CS5 =
Jean-Marie Schwartz
 
Posts: 2499
Joined: 23 Nov 2004, 04:30


Return to QuarkXPress 8, 9 & 10: AppleScript

Who is online

Users browsing this forum: No registered users and 1 guest