Script in Quark 7.5

hi… we just switched to Quark 7.5 from 6.5. The script below worked fine in 6.5, but it doesn’t SAVE in quark 7.5.
The purpose of this script is to prompt for a job number, then build a proofing file by opening a template and then importing the art.pdf, the bc.pdf and a sheet.pdf and then to save it in the folder of that job number. The save part isn’t happening for some reason. I get no errors.

AND… if you have ways of simplifying or improving this… that would be great too.

thanks for looking
david

try
	tell application "Finder"
		activate
		
		set myDialog to display dialog "Job:" default answer "0" buttons {"Cancel", "OK"} default button 2
		set jobNum to text returned of myDialog
		set aArtPdf to "Central PDF Proofs:" & jobNum & ":" & jobNum & "ART.pdf" as string
		set aBCPdf to "Central PDF Proofs:" & jobNum & ":" & jobNum & "BC.pdf" as string
		
		set aSheetPdf to "Central PDF Proofs:" & jobNum & ":" & jobNum & "Sheet.pdf" as string
		try
			set destFolder to (name of first folder of folder "Work Files2" of disk "Art Department 2" whose name begins with jobNum)
		on error
			display dialog "Folder Not Found"
		end try
		
		
	end tell
	
	
	tell application "QuarkXPress"
		
		tell application "Finder" to open ("artdept2x:users:admin:desktop:PDF-GENERIC")
		activate
		tell front document
			set properties to {bounds:{40, 40, 900, 1200}}
			tell page 1
				try
					make picture box at beginning with properties {polygon points:{{".93\"", "0\""}, {".93\"", "2.15\""}, {"0\"", "2.15\""}, {"0\"", "8.5\""}, {"4\"", "8.5\""}, {"4\"", "0\""}}}
					tell picture box 1
						set image 1 to file aArtPdf
					end tell
				on error
					display dialog "Can't Find ART PDF"
				end try
			end tell
			tell page 2
				try
					make picture box at beginning with properties {polygon points:{{".93\"", "0\""}, {".93\"", "2.15\""}, {"0\"", "2.15\""}, {"0\"", "8.5\""}, {"5\"", "8.5\""}, {"5\"", "0\""}}}
					tell picture box 1
						set image 1 to file aBCPdf
					end tell
				on error
					display dialog "Can't Find BC PDF"
				end try
			end tell
			tell page 3
				try
					make picture box at beginning with properties {bounds:{"0\"", "0\"", "11\"", "8.5\""}}
					tell picture box 1
						set image 1 to file aSheetPdf
					end tell
				on error
					display dialog "Can't Find SHEET PDF"
				end try
			end tell
		end tell
		save document 1 in file ("Art Department 2:Work Files2:" & destFolder & ":" & jobNum & "proof") version vers current without template
	end tell
end try

bump… any suggestions??

david

Of course you get no errors: You are running the whole code in a try-block. Just add an on error-command to see the actual error:


try
	-- a lot of code
on error errmsg number errnum
	tell me
		activate
		display dialog "An error occured:" & return & return & errmsg & return & "(" & errnum & ")" buttons {"OK"} default button 1 with icon stop
	end tell
end try

I tried your script (just modified some settings to suit my own environment) with QXP 8 and it worked just fine.

I added your error code… but still get no error. The script runs the way it should, it just doesn’t save the new file into the folder.
Hmmmm

david

Just a thought: Do you have write permission in the destination folder?

Yes I do. What I find strange is that there is no error message or anything… Maybe if I try having it write the folder to my local hard drive. The folder that I am currently aiming at is on a network drive.