: This script works fine, as long as I resave the
: “CastoffTemplate” file each time I open Quark. For
: as long as Quark is running, the script works fine. But after
: I shut down my computer, or restart Quark for some reason
: (after a crash, for example), the script tells me that
: "Quark XPress got an error: file some object cannot be found
: Why is this? Is there something wrong with my code? As I said, as
: long as I do a “save as…” for the Quark File, the
: script works perfectly, but if I have to do this every
: session, the script is kind of useless. Anyone know how to get
: around this?
: here’s the code:
: tell application “QuarkXPress? 4.11”
: activate
: set measurements showing to false
: set thepath to “Don’s HD: Pop-ups: AppleScript”
: open file “CastoffTemplate”
I think this would work if the full reference to the file is used, ie.:
set thepath to "Don's HD:Pop-ups:AppleScript:"
open file (thepath & "CastoffTemplate" as string)
I remember seeing some examples of Quark’s ability to remember a default folder path which would allow opening files by file name only, but I’ve not investigated as it was easier for me to figure out complex scripts with “hardwired” file references and rest assured that nothing funny was going on between Quark and Navigation Services or any 3rd party software that changes default folder behavior.
: The error message appears at the last line (there’s actually a
: bit more to the script, but as the error never reaches that
: stage, I haven’t posted the whole thing) I’ve also tried open
: file (alias “Don’s HD:Pop-ups:AppleScript:CastofTemplate”) but the same
: error happens. Any ideas? Thanks, Don
The command ‘open file (alias “Mac HD:aFile”)’ is a double reference, it should be either ‘open file “Mac HD:aFile”’ or ‘open alias “Mac HD:aFile”’