Re: Applescript and VBA
Re: Applescript and VBA
- Subject: Re: Applescript and VBA
- From: Jeremy Sellors <email@hidden>
- Date: Wed, 09 Jan 2002 21:53:57 -0800
Also,
>
> I'm
>
> interested in finding out which apps used in Desktop Publishing are
>
> scriptable with VBA. Quark?
Have you had a look at Deneba's Canvas 8? it is scriptable in both
AppleScript and VB. I have used the AppleScript part and it is quite easy to
use. You can script layers etc., and it has it's own AppleScript menu like
Outlook Express.
tell application "Canvas 8"
tell page 1 of document 1
set newLayer to make new layer at beginning
set countOfLayers to count of layers
set StackPos2 to stacking position of layer "Road Layer"
set StackPos to stacking position of layer "Text Layer" -- returns
layer position
set stacking position of layer "Text Layer" to 4 --moves layer
set StackPos3 to stacking position of layer "Road Layer" -- shows
changed layer position
end tell
end tell
also this example gathers images and text to build a project:
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}
set FileChosenName to choose file name
save front document in FileChosenName as Canvas
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
I have used this program to generate spot and CMYK separations for a 11.5 x
21.45 weekly newspaper so I think it has potential for Desktop Web
Publishing. It works on OS 9 or X. It is worth a look anyway. You can
download a demo at
http://www.deneba.com/ and see for yourself.