Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Quark 7
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quark 7





The following code works fine under 6x but fails with "Can't make some data into expected type" error in 7.

Set TheFile to "put the path in here"
Tell Application "Quark"
	Save Document 1 in file TheFile
End Tell


That's what Quark's dictionary says:

save: Save an object (from Standard Suite)
	save reference  -- the object to save
 		[in alias] -- the file in which to save the object

so the required parameter should be an alias.

But I testet

tell application "QuarkXPress Passport"
	save document 1 in "Macintosh HD:Users:peterw:Desktop:doc.qxd"
end tell

with success.

And I got an error for
save document 1 in alias "Macintosh HD:Users:peterw:Desktop:doc.qxd"

Considering Versions 7.x the best would be something like:

try
	save document 1 in "Macintosh HD:Users:peterw:Desktop:doc.qxd"
on error
	try
		save document 1 in file "Macintosh HD:Users:peterw:Desktop:doc.qxd"
	on error
		try
			save document 1 in alias "Macintosh HD:Users:peterw:Desktop:doc.qxd"
		on error
			error
		end try
	end try
end try

Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
References: 
 >Quark 7 (From: Gary Tate <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.