Adobe 26001360 Scripting Guide - Page 38
Start Illustrator., the operation of the script. As you look through the script
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 38 highlights
38 Scripting Illustrator 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