Can anyone fix my Quark error?

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”
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

: 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”
: 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
I am new at this as well but if you are going to “hardwire” the path try:
set thepath to “Don’s HD: Pop-ups: AppleScript:” --be sure to include the colon at the end open file (thepath & “CastoffTemplate”)
Don’t know if it will work but worth a try.
Good luck!
Steven

: I believe that the command set thepath to “Don’s…”
: just sets a variable and not the default path. When you Save
: As, Quark somehow sets the default path to look for the file.
: Anytime that Quark is exited, this path is removed. Thus as
: they have stated you need to hardwire the path into a variable
: that you use to call the file.
: Does anyone know how to set a default path for Quark or any other
: application?
Thanks for the help, guys, the error is mine…I set the wrong path in the script (DUH!!! forgot to specify “desktop folder”) so each time I restarted Quark it couldn’t find the file. After I had located it once, and that folder was specified as the default, Quark always looked there first and the script worked. Thanks again, Don