Differences between OS 10.3 to 10.4?

I have a script I depend on to postscript files from Quark to Distiller, my problem is that the script will not run on OS 10.4, but works fine on 10.3 which it was created in. Any suggestions as to what I can do to resolve this?

I m sure its some very small change between OS’s, fixed by some kind of find and replace??

Thanks for the help!

spowers@excelligence.com

hi,

my suggestion is pretty basic. post the error you are getting and the script or portion of the script where you think the problem lies. you are asking for very specific help, but you only give enough details for a poorly informed guess. there are a lot of people here who would like to help you, but they depend on you to give them the tools they need to replicate the problem.

cheers.

Can you define “will not run”?

  1. You run it and it won’t even activate
  2. You run it and it activates, but nothing happens
  3. You run it and something happens but not everything that’s supposed to
    a) An error occurs at some point
    b) No error occurs
    c) What’s an error?
  4. You run it and everything works fine, and you were just confused

Yeah, post the code that doesn’t work so we know what we’re trying to fix. :rolleyes:

You gotta help us help you. How can we suggest anythingl without knowing what’s really happening on your end, and without seeing the code? There are probably hundreds of changes to applescript, to the app’s you’re trying to automate, to the OS and other components that may be used by your script. You need to be WAAAY more specific to even get any interest in your post, then you might find someone who can actually help you solve the problem.

j

Ok so here is what I am getting.

First, the script is a droplet that prompts for a place to save the ps file, I save it to a watched folder for Distiller. I drag and drop the quark file on the droplet and it begins to execute.

The file opens properly, dialog box comes up and everything looks fine, the file closes, the printer utility launches, it begins to spool, then I get the “QuarkXPress got an error: Connection is invalid.”

Next Quark crashes, and another error box from Applescript comes up "AppleEvent timed out.

Below is the code:

on open theSelection
–Select the folder for output (Distiller Watch Folder)
set distillerFolder to (choose folder name with prompt “Select the Distiller Watch Folder:”)

--Display a file dialog to specify a location and file name for the log file
--set logFile to (choose file name with prompt "Select a location for the log file:")

-- Launch Acrobat Distiller
tell application "Acrobat Distiller 6.0.2"
	activate
end tell

-- Process the individual Quark files and their associated image files
repeat with fileList in theSelection
	set filePath to fileList as string
	tell application "Finder"
		activate
		try
			tell application "QuarkXPress"
				open file filePath
				set boxCount to 0
				set bxAngle to 0
				set bxWidthPercent to 0
				set bxHeightPercent to 0
				set bxScale to {}
				set bxContent to ""
				set i to 1
				set docRef to ""
				
				tell front document of application "QuarkXPress"
					try
						activate
					end try
				end tell
				
				-- Print the file as an EPS document to the user-specified Distiller Watch Folder
				-- Set out settings
				tell application "QuarkXPress"
					tell document 1
						tell print setup
							ignoring white space and case
								
								(* SET QUARK PRINTING PARAMETERS HERE *)
								set orientation to portrait
								set registration marks to centered
								set registration marks offset to "12 pt"
								set separation to false
								set include blank pages to false
								set print spreads to false
								set print thumbnails to false
								set collate to false
								set back to front to false
								set page sequence to all pages
								set page position to center position
								set tiling to off
								set bleed to 0.125
								set paper offset to "0 pt"
								set printer type to "Xerox Phaser 7750GX"
								set paper size to "Custom"
								set paper width to "9"
								set paper height to "11.5"
								set reduce or enlarge to 100
								set page gap to 0
								set fit in area to false
								set print colors to composite CMYK
								set resolution to 2400
								(* END OF QUARK PRINT PARAMETERS *)
								
							end ignoring
						end tell
					end tell
					set pdfFile to name of document 1 as string
				end tell
				
				set page1PSName to (distillerFolder as string) & "In:" & name of document 1 & "-1.ps" as string
				set page2PSName to (distillerFolder as string) & "In:" & name of document 1 & "-2.ps" as string
				
				print document 1 PostScript file spreadPSName
				delay 15
				tell document 1
					tell page 1
						print PostScript file page1PSName
					end tell
					delay 15
					tell page 2
						print PostScript file page2PSName
					end tell
				end tell
				close document 1 saving no
			end tell
			
		on error error_message
			display dialog error_message buttons {"OK"} default button 1
		end try
	end tell
end repeat

-- Go through the Distiller output folder and delete all the log and PostScript files
tell application "Finder"
	-- get the list and count of files from the source folder
	delay 120
	set folderToProcess to (folder distillerFolder as text) & "Out:"
	set itemsToProcess to list folder folderToProcess
	set fileCount to (count of (folder folderToProcess))
end tell

repeat with i from 1 to fileCount
	set thisItem to (item i of itemsToProcess)
	set fullthisItem to (folderToProcess & thisItem)
	set fileInfo to (info for file fullthisItem)
	if (name extension of fileInfo is "ps") or (name extension of fileInfo is "log") then
		tell application "Finder"
			delete file fullthisItem
		end tell
	end if
end repeat

display dialog ("Script run complete!")

end open

10.4 broke some things concerning AS and printing. They did release an extension that solved most of the problems.

Do a quick search on their site to find it.

-N

General remark:
it would help in such cases to include the event log and determine EXACTLY where and what’s going wrong…

I’ll gues your problem is in this lines:


                    set page1PSName to (distillerFolder as string) & "In:" & name of document 1 & "-1.ps" as string
                    set page2PSName to (distillerFolder as string) & "In:" & name of document 1 & "-2.ps" as string

simple to check by adding a line:


                    set page1PSName to (distillerFolder as string) & "In:" & name of document 1 & "-1.ps" as string
                    display dialog page1PSName to (distillerFolder as string) & "In:" & name of document 1 & "-1.ps" as string
                    set page2PSName to (distillerFolder as string) & "In:" & name of document 1 & "ps" as string
                    display dialog page2PSName

You must look if the variable page1PSName is a string and not a list. Try this with all your variables. Somehow in 10.4 it’s a little bit different as 10.3 with the result some variables wich under 10.3 are a string with 10.4 are a list …

If you’ve having trouble finding the scripting update and Im remembering correctly it’s part of “Output Enhancements XTensions” nice of Quark to bury it in with something else. Lots of people requested this to be available as a single download but it’s never happend.

Thanks for all your help. I am going to try the fixes today and will get my results up later this afternoon, thanks!

s.

So I took the advice and added the additional lines submitted to me. Upon compiling I get the following error dialog box:

Syntax Error
Expected end of line, etc. but found “to”.
(Highlighted in BOLD below.)

So I changed the “to” to “of” (because I am a nooby to AS and dont know what else to do) and got the following error:

Can’t get page1PSSName of “MORRISSEY: Test:”.
MORRISSEY being the name of my h.drive and Test being the name of the folder.

set page1PSName to (distillerFolder as string) & “In:” & name of document 1 & “-1.ps” as string
display dialog page1PSName to (distillerFolder as string) & “In:” & name of document 1 & “-1.ps” as string
set page2PSName to (distillerFolder as string) & “In:” & name of document 1 & “-2.ps” as string
display dialog page2PSName

FYI
– Process the individual Quark files and their associated image files
repeat with filestring in theSelection
set filePath to filestring as string
tell application “Finder”
activate

Any suggestions? I feel I am getting close but my AS skills are limited, thanks again.

Just realized I received another error message after the “MORRISSEY” message, this is what I got:

Can’t make some data into the expected type.

Hello

There was a typo in the passed script:

Here is the corrected code.


set page1PSName to (distillerFolder as string) & "In:" & name of document 1 & "-1.ps" as string
display dialog page1PSName
set page2PSName to (distillerFolder as string) & "In:" & name of document 1 & "ps" as string

Yvan KOENIG (from FRANCE mercredi 15 novembre 2006 20:36:05)

Correct Yvan, that is the correct code. Just to check if the variable has the correct value (what you expected).

Sorry!

Just to butt in.
Updating Quark 6.5 to 6.52 fixes the print bug aswell.

http://www.quark.com/service/desktop/downloads/details.jsp?idx=654

MISSION ACCOMPLISHED!!

I started out updating to Quark 6.52, and using the newest extensions in the Output Enhancement package. I am getting an error printing though,

localhost is busy, will retry in 30 seconds, delete job(s)

But after hitting delete, I look in the Distiller watched folder and my PDF’s are there and in tact. So I gotta work on that, not sure where to begin but it shouldn’t be a big deal.

Anyway, thank you all, we just saved my co. $6K, too bad I won’t see a dime of it : )

Cheers,

s.