Save/Close Quark 6

OS 10.3.9 Script Editor 2.0 AppleScript 1.9.3

Firstly, to previous responders, thanks; however, more help needed, please.

Still having major problems, however, and user growing impatient (and myself extremely frustrated). I have done a bunch of reading and analyzing sample scripts and experimenting but my comfort level with AppleScript is aggravatingly slow in coming.

User insists the script must open Quark 3, 4, 5 docs & save as Quark 6; simply changing file type won’t do. Changing the file type does, however, open the file under the original name rather than the generic “Project 1.”

I can open individual files, but cannot construct a close that doesn’t produce an error”“can’t make.into expected type” or “-69” or whatever

repeat with theItem in myFiles
	set file type of theItem to fileType -- change file type to "XPRJ"
	tell application "QuarkXPress"
		activate
		open theItem use doc prefs "yes" remap fonts "no" do auto picture import "no"
		close document theItem saving yes
	end tell


end repeat

Does this one help you? Try with save version 60.

on open fileList
	set numOfFiles to (number of items in fileList) as text
	repeat with oneFile in fileList
		
		
		tell application "QuarkXPress Passport"
			open oneFile
			save document 1 in oneFile version vers 50
		end tell
	end repeat
	activate
	beep 2
	display dialog numOfFiles & " files converted." buttons "Ok" default button 1 giving up after 5
end open

Or this saves a copy to a folder on the desktop.

on open theseFiles
	repeat with i from 1 to the count of theseFiles
		set thisFile to item i of theseFiles
		tell application "QuarkXPress"
			open thisFile use doc prefs yes remap fonts no do auto picture import no without reflow
			set origName to name of project 1
			set saveName6 to "Marks-G5:Users:marklarsen:Desktop:Quark-V6:" & origName & ".qxp" as text --  
			save document 1 in saveName6 version vers 60
			close document 1 without saving
			set saveName6 to saveName6 as alias
		end tell
	end repeat
end open

thanks for your post.

I modified my code accordingly:

on finderprocess(myFiles)
repeat with oneFile in myFiles
tell application “QuarkXPress”
open oneFile use doc prefs “yes” remap fonts “no” do auto picture import “no”
save document 1 in oneFile version vers 60
end tell
end repeat
end finderprocess

Sadly, it still does not work. AppleScript notifies:

Can’t make «class docf» “Wyle_8 copy” of «class cfol» “untitled folder1 copy” of «class cfol» “Desktop” of «class cfol» “angelorauseo” of «class cfol» “Users” of «class sdsk» of application “Finder” into the expected type.

This simple snippet works fine on my system (Quark 6.5 & 10.3.9):

set thisFile to choose file
set thisFilePath to thisFile as string


tell application "QuarkXPress"
	open thisFile
	save document 1 in (thisFilePath & "converted.qxp") version vers 60
end tell

-N

To everyone who offered help”Thank you. It works!!!

My major malfunction was a faulty path designation.

One of these days I might get the hang of this thing called AppleScript.