Combining single page Quark docs via Applescript

Can anyone give me a heads up on a quick way to combine numerous single page Quark docs into a single doc. Trying to avoid tedious thumbnail dragging. Pages will be edited after they’re combined, so creating PDFs and combining in Acrobat is not a solution. The file provider always supplies single page files. They will be very consistant to each other, so I don’t have to worry about style sheets and colors should match across the documents. Any script snippets that I can build on?

You can assume that I have the two single page documents to be combined open at the same time. I can create the iteration that opens the docs… just not sure how to move the pages between. Trying to avoid selecting all items and just pasting in place if there is something that works comparably to thumbnail dragging.

Any help if appreciated, or let me know if you need to know anything else.

Thanks,

Chris W.

Model: Dual G4
AppleScript: 1.10.3
Browser: Firefox 1.0.4
Operating System: Mac OS X (10.4)

I thought this would be easy but there doesn’t seem to be a very easy way to do this. I have used this before to copy everything on page 1 and move it to page 2 (in position):


set tool mode to drag mode
		select every generic box
		copy current box to end of page 2

I thought you could just add of document “CompositeFile” to the end to have it target another document but couldn’t get it to work.

Anyway, I got something that seems to work. It uses “Paste in place” which I triggered by the keyboard shortcut. I also have commented out another approach I was trying where I grabbed the x anf y coordinates before copying.

Hope something here leads you to a solution.


set PathToDesktop to path to the desktop as text
tell application "QuarkXPress"
	activate
	tell front document
		set tool mode to drag mode
		select every generic box
		--copy (left of bounds of current box as real) to XCoord
		--copy (top of bounds of current box as real) to YCoord
		copy
		set selection to null
	end tell
	close front document without saving
	open file (PathToDesktop & "test2") use doc prefs yes remap fonts no do auto picture import yes
	tell front document
		tell page 1
			tell application "System Events"
				keystroke "v" using {command down, option down, shift down}
			end tell
			--set origin of bounds of current box to {XCoord, YCoord}
		end tell
	end tell
end tell

Thanks for your help. I thought it likely that Quark would not have the means available to do a “simple” thumbnail copy from doc to doc, but thought I’d ask. It would save me alot of work. I’ll let you know what I finally come up with.

Chris W.