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.
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"
activate
try
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
else
set selectedBox to ""
end if
else
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
else
error "User canceled." number -128
end if
end if
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.