Scripting Quark 4 to save in OSX

I asked this question a while back but I was away from this project and haven’t solved the problem. I have a script that changes templates every week and then creates a log file. It works fine in OS9 but not in Panther. Here is the section that creates the log file.

tell application “Finder”
set Start to name of startup disk
end tell
set Dest to Start & “:Out:”

tell application “QuarkXPress™”
activate
tell default document 1

	set page width to "27.94cm"
	set page height to "43.18cm"
	set automatic text box to false
	set horizontal measure to inches
	set vertical measure to inches
end tell
make document at beginning
set docname to "Log"
tell document 1
	activate
	
	save in (Dest & docname) version vers 40
	close saving «constant RMPFno  »
end tell

end tell

It creates the log file just fine, but it gives an error when it goes to save the log file in the out folder. If i hardcode the save directory it works, but I can’t do that because the directory name changes every week. I removed the part that renames the directory to make it shorter to post.

I am using Quark 4.11 under panther. any ideas?

Thanks

try changing this line: save in (Dest & docname) version vers 40

to: save in file (Dest & docname) version vers 40

HTH -john

Thanks for the advice John, but still no joy.

I get the error:

can’t get document1 of application ‘quarkxpress’ access not allowed.

the save is the only part of the script that doesn’t work, the rest of the script works just fine and is a lot faster then in OS 9. I would like to upgrade the computers to OSX but can’t until I get this script working.

This works for me:


tell application "Finder" 
set Start to name of startup disk 
end tell 
set Dest to Start & ":Out:" 

tell application "QuarkXPress™" 
activate 
tell default document 1 

set page width to "27.94cm" 
set page height to "43.18cm" 
set automatic text box to false 
set horizontal measure to inches 
set vertical measure to inches 
end tell 
make document at beginning 
set docname to "Log" 

save document 1 in file (Dest & docname) version vers 40 
close document 1 saving no

end tell 

HTH- john