Quark bug maybe ?

trying to print doc to PS file

this works on my laptop (macbook pro intel OSX 10.4.8 ) using quark 6.52

does not work on desktop (Dual Core G5 OSX 10.4.6) using quark 6.5


set workpath to ("" & (path to current user folder) & "Desktop:")
tell application "QuarkXPress"
	activate
	set filepath to (workpath & name of document 1 & ".ps")
	tell document 1
		set PageWidth to "11.5"
		set PageHeight to "9"
		if PageWidth is greater than PageHeight then
			set PageOrientation to landscapte
		else
			set PageOrientation to portrait
		end if
		
		
		set properties of print setup to {printer type:"HP Color Laserjet 8550", tiling:off, back to front:false, bleed:0, collate:false, data format:binary data, fit in area:false, flip horizontal:false, flip vertical:false, halftone screen:"100", include blank pages:false, orientation:PageOrientation, page position:center position, page sequence:all pages, paper size:"Custom", paper width:PageWidth, paper height:PageHeight, print colors:composite CMYK, print quality:normal, print spreads:false, print thumbnails:false, reduce or enlarge:"100%", resolution:300, separation:false}
		
		print PostScript file filepath
	end tell
end tell

also having trouble on LT trying to do this


		set PageWidth to width of bounds of current page as real
		set PageHeight to height of bounds of current page as real

I’m also having an issue with Quark 7.0.2 and printing

print PostScript File fileName

produces an error

“QuarkXpress got an error: Can’t continue print”

that also happens with “print”

dunno what’s up, here’s the code:

set theHD to (path to desktop folder as string)
set savePath to theHD
tell application "QuarkXPress"
	--activate
	if (exists document 1) is false then
		return beep
	else
		tell document 1
			try
				set docName to the name
			on error --will error if document is not saved
				set docName to "UnsavedFile"
			end try
		end tell
	end if
	set fileName to savePath & docName & ".ps"
	print PostScript file filename
end tell

deanshavit,
what version of os you running

definitly a bug just upgranded to 6.52 and on desktop the script runs fine

OK, not a bug. Evidently Quark 7 and higher now has another object to call before printing, namely the “Document” object. Here’s the script that works:

set theHD to (path to desktop folder as string)
set savePath to theHD
tell application "QuarkXPress"
	activate
	if (exists document 1) is false then
		return beep
	else
		tell document 1
			try
				set docName to the name
			on error --will error if document is not saved
				set docName to "UnsavedFile"
			end try
		end tell
	end if
	set fileName to savePath & docName & ".ps"
	tell document docName
		print PostScript file fileName
	end tell
end tell