Working With Text Frames; Threaded Frames - Adobe 65010248 - Illustrator CS4 - PC Manual

Scripting guide
Hide thumbs Also See for 65010248 - Illustrator CS4 - PC:
Table of Contents

Advertisement

C
4: Scripting with AppleScript
HAPTER
Depending on what is selected, the
To get or manipulate the properties of the selected art items, you must retrieve the individual items in the
array. To find out an object's type, use the
The following sample gets the first object in the array, then displays the object's type:
tell application "Adobe Illustrator"
set myDoc to current document
set selectedObjects to selection of myDoc
set topObject to item 1 of selectedObjects
display dialog (class of topObject)
end tell
The first object in a selection array is the selected object that was last added to the page, not the last object
selected.
Selecting artwork objects
To select an art object, the object's

Working with text frames

To create a text frame of a specific type in AppleScript, use the
set myRect to make new rectangle in current document with properties
{position:{100, 700}, height:100, width:100}
set myAreaText to make new text frame in current document with properties
{kind:point text,contents:"Text Frame 1"}

Threaded frames

As in the Illustrator application, you can thread area text frames or path text frames.
To thread existing text frames, use the
When copying the following script to your script editor, place the value of the
line. The long-line character (
tell application "Adobe Illustrator"
make new document
make new rectangle in current document with properties
{position:{100, 500}, height:100, width:100}
make new text frame in current document with properties
{kind:area text, text path:the result, name:"tf1",
contents:"This is two text frames linked together as one story, with
text flowing from the first to the last. First frame content. "}
make new rectangle in current document with properties
{position:{300, 700}, height:100, width:100}
make new text frame in current document with properties
{kind:area text, text path:the result, name:"tf2",
contents:"Second frame content." }
--use the next frame property to thread the frames
set next frame of text frame "tf1" of current document to
text frame "tf2" of current document
redraw
end tell
property value can be an array of any type of art objects.
selection
property.
class
property.
selected
or
next frame
) is not valid within a string value.
¬
property of the
kind
property of the
previous frame
Working with text frames 36
object:
text frame
object.
text frame
property on one
contents

Advertisement

Table of Contents
loading

This manual is also suitable for:

Illustrator cs4

Table of Contents