Adobe 26001360 - Illustrator CS - PC Manual page 38

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

Advertisement

38
4. Enter the following code. The lines which begin with a single quote character (') are
comments, and will be ignored by the scripting system. They're included to describe
the operation of the script. As you look through the script, you'll see how we create,
then address each object in turn.
'Hello World! Script
Private Sub Command1_Click()
Dim appRef As New Illustrator.Application
Dim documentRef As Illustrator.Document
Dim sampleText As Illustrator.TextFrame
'Create a new document and assign it to a variable
Set documentRef = appRef.Documents.Add
'Create a new text frame item and assign it to a variable
Set sampleText = documentRef.TextFrames.Add
'Set the contents and position of the TextFrame
sampleText.Position = Array(200, 200)
sampleText.Contents = "Hello World!"
End Sub
5. Save the form.
6. Start Illustrator.
7. Return to Visual Basic and run the program. If you created a form, click the button you
created earlier.
12 Aug 03
Scripting Illustrator

Advertisement

Table of Contents
loading

This manual is also suitable for:

Illustrator cs

Table of Contents