Quark 4.1 printing script?

Hi,
I’ve written a script for Quark that will change all my text boxes to white and all text to 100% black, but now I want it to print that document and close it without saving. I can’t seem to get the second part to work. I’m really new to scripting, can anyone point me in the right direction? I eventually want to make this a folder action, but I’m trying to work in small steps first.
Anyhow, here’s where I’m at:


set PS to true
tell application "QuarkXPress™"
	tell document 1
		set color of every text box to "white"
		set properties of stories to {color:"black", shade:"100"}
	end tell
	tell document 1
		set SprdCount to (count of spreads)
		set DocName to name
		tell print setup
			set collate to false
			set bleed to 0.0
			set registration marks to centered
			set paper size to "11x17"
			set orientation to landscape
			set reduce or enlarge to 85
			set separation to false
			set print spreads to PS --returns true or false
		end tell
		repeat with j from 1 to SprdCount
			if PS is false then
				set PgCount to (count of pages of spread j)
				repeat with i from 1 to PgCount
					print page i of spread j
				end repeat
			else
				print spread j
			end if
		end repeat
	end tell
	close document 1
end tell

Thanks,
Dennis

Thanks for that code. I still have trouble reading through some of the dictionaries.

The problem I have now is that everything prints on 8.5x11 paper when it should be printing on 11x17 inch paper.
Any ideas?

nevermind…i got it working. i hadn’t defined the printer type.
thanks again for the help.