Saving a document in Canvas
Saving a document in Canvas
- Subject: Saving a document in Canvas
- From: Jeremy Sellors <email@hidden>
- Date: Tue, 18 Mar 2003 07:17:15 -0800
In OS X 10.2.4 the line in the following script, "save front document
in FileChosenName as Canvas", generates an error "Canvas 8 got an
error: Can't make some data into the expected type."
I had a feeling it is something to do with POSIX path but I am not sure
how this works.
This script worked fine in OS 9.
tell application "Finder"
activate
set ImportFolder to choose folder
set theFileList to files of ImportFolder
if class of theFileList is not list then set theFileList to
theFileList as list
set folderpath to container of first item of theFileList as text
end tell
tell application "Canvas 8"
activate
make new document at beginning with properties {document
type:illustration}
--document type no document/illustration/publishing/presentation [r/o]
repeat with i in theFileList
set x to folderpath & name of i as string
place x into layer 1 of page 1 of front document at position {10, 20}
tell application "Finder" to set FileChosenName to choose file name
--returnes <file "a G4 Dual Main X:Users:jem:Desktop:test55">
save front document in FileChosenName as Canvas Error: "Canvas 8 got
an error: Can't make some data into the expected type."
end repeat
end tell
on fileNameAndPath(item_path)
set AppleScript's text item delimiters to {":"}
set the item_name to last text item of item_path
set the parent_path to text 1 thru text item -2 of item_path & ":"
set AppleScript's text item delimiters to {""}
end fileNameAndPath
the dictionary has:
save document -- Document to be saved
[in string] -- The copmplete file name
[as AI/BMP/CALS/Canvas/Canvas
Template/CGM/DCX/DRW/DXF/EPSF/FLASH/GIF/HTML/ICON/IFF/JPEG/PCX/PNG/PDF/
Photoshop/TARGA/TIFF/WPG] -- The document file type of the document in
which to save the data
[with options anything] -- optional format parameter
[selection boolean] -- Save selected objects only
any help would be appreciated. Jeremy
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.