Adobe 26001360 Scripting Guide - Page 345
GrayColor, Example 27.1
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 345 highlights
Adobe Illustrator CS Scripting Guide Table 5.51 GraphItems - Methods Method Returns RemoveAll() Nothing 345 What it does Deletes all objects in this collection GrayColor A gray color specification used to apply a Gray color to an art item. Table 5.52 GrayColor - Properties Property R/O Value type What it is Application Gray R/O Application object The Illustrator Application object Double The tint of the gray as a value in the range 0.0-100.0, where 0.0 is black and 100.0 is white Example 27.1 This example illustrates how to change the color of the first word in the active document to a shade of gray. Dim appRef As New Illustrator.Application Dim text As Illustrator.TextRange Dim firstWord As Illustrator.TextRange Dim textColor As New Illustrator.GrayColor 'Get a reference to the first word in the active document Set text = appRef.ActiveDocument.TextFrames(1).TextRange Set firstWord = text.Words(1) 'Create the new color textColor.Gray = 45 'firstWord.CharacterAttributes.Filled = True firstWord.CharacterAttributes.fillColor = textColor 12 Aug 03