Scripts going mad, won't compile

I upgraded from OS9 to 10.4 recently, and all seemed well.

Now when I open my scripts, I don’t know the technical term, but they no longer compile and commands have been replaced, e.g.

if «class page» 2 exists then

where it used to say

if page 2 exists then (within a ‘tell document 1 of Quark’, obviously)

My InDesign script (only written last week, in new environment) has done the same and won’t compile.

Where I can find a plain text version of a script, it won’t compile, e.g. AppleScript no longer recognises ‘delimit item’ in Quark.

I have a feeling this is something big to do with OS X, but can’t think what. Any ideas?

Thanks, yours bewildered,

Model: G4
AppleScript: 1.10
Browser: Safari 412.5
Operating System: Mac OS X (10.4)

OK, by browsing the forum I’ve gathered that this should only happen if AppleScript can’t see the application. But I’ve successfully compiled with everything edited out except for

tell application “QuarkXPress”

end tell

so it’s definitely seeing it. It’s just that any Quark class isn’t recognised. Bizarrely the same happens with InDesign, but my Filemaker Pro scripts are working fine. Oddly, when I try to open the Quark dictionary the application isn’t listed in the ‘default applications’ list, but when I browse I can open the dictionary fine.


Probably something to do with AS upgrades, or dictionary issues. How about posting some offending code?

Ok, Craig - this is a fragment from one of the sample scripts that came with Quark, it won’t compile as I didn’t want to post the whole thing… but it shows what happens. I can’t imagine it looked like this when they put it on the CD!

tell application "QuarkXPress"
		set oldDelim1 to «class DLIT» "/" of «class delt» 1
		set «class DLIT» "/" of «class delt» 1 to «constant DLTTCBCW»
		set oldDelim2 to «class DLIT» ","
		set «class DLIT» "," to «constant DLTTCBCW»
		set oldDelim3 to «class DLIT» "."
		set «class DLIT» "." to «constant DLTTCBCW»
		if not (exists document 1) then error "No document is open."
		if not (exists «class CUBX») or «class BXTY» of «class CUBX» is not «constant BXTYTXTx» then
			set repeatNum to count of text flows of document 1
			set curBox to false
			if exists «class CUBX» then
				set selectedBox to «class CUBX» of document 1
				set selectedBox to ""
			end if
			set FractionScope to button returned of (display dialog ¬
				"Do you want to make fractions for the current story of the whole document?" buttons {"Cancel", "Document", "Story"} default button "Story")
			set selectedBox to «class CUBX» of document 1
			if FractionScope is "Story" then
				set repeatNum to 1
				set curBox to true
			else if FractionScope is "Document" then
				set repeatNum to count of text flows of document 1
				set curBox to false
				error "User canceled." number -128
			end if
		end if

After 3 days of mayhem, the fault has disappeared as if by magic. If anyone has any idea why it happened I’d appreciate it in case it happens again!

Will try to lurk less and be more helpful…


Just had a thought. I believe something similar happened to me with Illustrator. I’ve got more than one version on my computer and if you have a different version of Quark open it might have the same results if the version has some differences in the language syntax and what it can and can’t do.