Canvas 8 script
Canvas 8 script
- Subject: Canvas 8 script
- From: Jeremy Sellors <email@hidden>
- Date: Mon, 10 Sep 2001 22:09:29 -0700
Has anyone tried scripting the new Canvas 8 (beta) for Mac OS X
This script places the files onto a page ready to work on in the document. I
only tested the script on OS 9.2.1. canvas can also be scripted with Visual
Basic but I am not sure how to go about that yet. I have not been able to
name the document although it will save onto the disk with the name I give
it but the document still remains "untitled 1"
tell application "Finder"
activate
set ImportFolder to choose folder
set theFileList to files of ImportFolder -- this works fine with the 10
or so different file types I tested with including text, line art and pixel
images
--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, name:"Test 22.CNV", full name:,
"Macintosh HD:Desktop Folder:testCanvas8X:Test 22.CNV"}
--document type no document/illustration/publishing/presentation [r/o]
repeat with i in theFileList
set ImageOrText to folderpath & name of i as string
place ImageOrText into layer 1 of page 1 of document 1 at position
{10, 20}
end repeat
end tell
Jeremy Sellors