Adobe 26001360 - Illustrator CS - PC Manual page 220

Scripting guide
Hide thumbs Also See for 26001360 - Illustrator CS - PC:
Table of Contents

Advertisement

220
Example 63.1
-- Story
--
-- Make a new document
-- Make two text frames
-- Set the previous frame of the second text frame to text frame 1
-- Add a story to text frame 1 (long enough to overflow to text frame 2
-- Count the number of stories
-- Add a new text frame
-- Count the number of stories
--
tell application "Illustrator CS"
activate
make new document
make new rectangle in document 1 with properties {position:{200, 600},
height:30, width:50}
make new text frame in document 1 with properties {name:"Text1", kind:area
text, text path:the result}
make new rectangle in document 1 with properties {position:{300, 550},
height:200, width:50}
make new text frame in document 1 with properties {name:"Text2", kind:area
text, text path:the result}
set previous frame of text frame "Text2" of document 1 to text frame "Text1" of
document 1
set the contents of text frame "Text1" of document 1 to "This is two text
frames linked together as one story"
set user interaction level to interact with all
display dialog "Number of Stories in Document: " & (count stories of document
1) as string
make new rectangle in document 1 with properties {position:{200, 300},
height:30, width:150}
make new text frame in document 1 with properties {name:"Text3", kind:area
text, text path:the result}
set the contents of text frame "Text3" of document 1 to "Each unlinked
textFrame adds a new story"
display dialog "Number of Stories in Document: " & (count stories of document
1) as string
set user interaction level to never interact
end tell
12 Aug 03
AppleScript Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Illustrator cs

Table of Contents