Quark Users - Pull Out Bleed Scripts

Hello All,

I’m not sure if these scripts will be useful to everyone but if you have to pull bleeds out (because your clients didn’t) these scripts might be of interest to you.

If you have any suggestions on how to make better or to simplify please reply.

Here are the scripts:

  1. The following script will pull out bleeds .125 of an inch on all page sides of the currently selected box.

try 
   tell application "QuarkXPress" 
      activate 
      tell document 1 
         if tool mode is not drag mode then 
            set tool mode to drag mode 
         end if 
         set PAGE_WIDTH to page width as number 
         set PAGE_HEIGHT to page height as number 
         set CURRENT_BOX to selection 
         if selection is null then error display dialog "Please select a box and try again" with icon stop buttons {"OK"} 
         set CURRENT_BOX_BOUNDS to origin of bounds of CURRENT_BOX as list 
         set IMAGE_OFFSET to offset of image 1 as list 
         set properties of CURRENT_BOX to {bounds:{-0.125, -0.125, PAGE_HEIGHT + 0.125, PAGE_WIDTH + 0.125}} 
         set offset of image 1 of CURRENT_BOX to {(item 1 of IMAGE_OFFSET as number) + (item 1 of CURRENT_BOX_BOUNDS as number) + 0.125, (item 2 of IMAGE_OFFSET as number) + (item 2 of CURRENT_BOX_BOUNDS as number) + 0.125} 
      end tell 
   end tell 
end try 

  1. The following script will pull out bleed .125 of an inch beyond the top of the page of the currently selected box.

try 
   tell application "QuarkXPress" 
      activate 
      tell document 1 
         if tool mode is not drag mode then 
            set tool mode to drag mode 
         end if 
         set PAGE_WIDTH to page width as number 
         set PAGE_HEIGHT to page height as number 
         set CURRENT_BOX to selection 
         if selection is null then error display dialog "Please select a box and try again" with icon stop buttons {"OK"} 
         set CURRENT_BOX_BOUNDS to bounds of CURRENT_BOX as list 
         set IMAGE_OFFSET to offset of image 1 as list 
         set properties of CURRENT_BOX to {bounds:{-0.125, (item 2 of CURRENT_BOX_BOUNDS as number), (item 3 of CURRENT_BOX_BOUNDS as number), (item 4 of CURRENT_BOX_BOUNDS as number)}} 
         set offset of image 1 of CURRENT_BOX to {(item 1 of IMAGE_OFFSET as number) + (item 1 of CURRENT_BOX_BOUNDS as number) + 0.125, (item 2 of IMAGE_OFFSET as number)} 
      end tell 
   end tell 
end try 

  1. The following script will pull out bleed .125 of an inch beyond the bottom of the page of the currently selected box.

try 
   tell application "QuarkXPress" 
      activate 
      tell document 1 
         if tool mode is not drag mode then 
            set tool mode to drag mode 
         end if 
         set PAGE_WIDTH to page width as number 
         set PAGE_HEIGHT to page height as number 
         set CURRENT_BOX to selection 
         if selection is null then error display dialog "Please select a box and try again" with icon stop buttons {"OK"} 
         set CURRENT_BOX_BOUNDS to bounds of CURRENT_BOX as list 
         set IMAGE_OFFSET to offset of image 1 as list 
         set properties of CURRENT_BOX to {bounds:{(item 1 of CURRENT_BOX_BOUNDS as number), (item 2 of CURRENT_BOX_BOUNDS as number), PAGE_HEIGHT + 0.125, (item 4 of CURRENT_BOX_BOUNDS as number)}} 
      end tell 
   end tell 
end try 

  1. The following script will pull out bleed .125 of an inch beyond the right of the page of the currently selected box.

try 
   tell application "QuarkXPress" 
      activate 
      tell document 1 
         if tool mode is not drag mode then 
            set tool mode to drag mode 
         end if 
         set PAGE_WIDTH to page width as number 
         set PAGE_HEIGHT to page height as number 
         set CURRENT_BOX to selection 
         if selection is null then error display dialog "Please select a box and try again" with icon stop buttons {"OK"} 
         set CURRENT_BOX_BOUNDS to bounds of CURRENT_BOX as list 
         set IMAGE_OFFSET to offset of image 1 as list 
         set properties of CURRENT_BOX to {bounds:{(item 1 of CURRENT_BOX_BOUNDS as number), (item 2 of CURRENT_BOX_BOUNDS as number), (item 3 of CURRENT_BOX_BOUNDS as number), PAGE_WIDTH + 0.125}} 
      end tell 
   end tell 
end try 

  1. The following script will pull out bleed .125 of an inch beyond the left of the page of the currently selected box.

try 
   tell application "QuarkXPress" 
      activate 
      tell document 1 
         if tool mode is not drag mode then 
            set tool mode to drag mode 
         end if 
         set PAGE_WIDTH to page width as number 
         set PAGE_HEIGHT to page height as number 
         set CURRENT_BOX to selection 
         if selection is null then error display dialog "Please select a box and try again" with icon stop buttons {"OK"} 
         set CURRENT_BOX_BOUNDS to bounds of CURRENT_BOX as list 
         set IMAGE_OFFSET to offset of image 1 as list 
         set properties of CURRENT_BOX to {bounds:{(item 1 of CURRENT_BOX_BOUNDS as number), -0.125, (item 3 of CURRENT_BOX_BOUNDS as number), (item 4 of CURRENT_BOX_BOUNDS as number)}} 
         set offset of image 1 of CURRENT_BOX to {(item 1 of IMAGE_OFFSET as number), (item 2 of IMAGE_OFFSET as number) + (item 2 of CURRENT_BOX_BOUNDS as number) + 0.125} 
      end tell 
   end tell 
end try 

Tie these scripts to your arrow keys or num pad.

Hope these scripts help you with production,
CarbonQuark

I have similar scripts for left page of spread, centre page & right page of spread. Here is how I did this the example is for left.

tell application "QuarkXPress"
	try
		set thisBox to current box
		if box type of thisBox is not picture box type or (file type of image 1 of current box) is null then error
	on error
		error "A single picture box containing an image must be selected."
	end try
	set CurBox to object reference of current box
	set origin of bounds of current box to {(-3), (-3)}
	set boxW to ((width of bounds of current box) as millimeter units) as real
	set boxH to ((height of bounds of current box) as millimeter units) as real
	try
		set (width of bounds of current box) to (boxW + 3) as millimeter units
	end try
	try
		set (height of bounds of current box) to (boxH + 6) as millimeter units
	end try
	copy (coerce ((offset of image 1 of CurBox) as measurements point) to list) to {Xoffset, Yoffset}
	set Xoffset to Xoffset as real
	set Yoffset to Yoffset as real
	try
		set (offset of image 1 of CurBox) to {(Xoffset + 3), (Yoffset + 3)}
	end try
end tell