🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17184

Re: Add a gradation to a rectangle font

#17184
From: roberto soto
Date: Mon, 30 Jun 2003 12:07
37 lines
1889 bytes
Hi Reyman,

Try this:

Set myInDesign = CreateObject("InDesign.Application.2.0")
    Set myDocument = myInDesign.ActiveDocument
    Set myPage = myDocument.Pages.Item(1)

Set myTextFrame = myPage.TextFrames.Add
    myTextFrame.GeometricBounds = Array("10p", "10p", "25p", "25p")

myTextFrame.TextContents = "Hello"

Set myColor = myDocument.Colors.Add
    myColor.Model = idProcessColor
    myColor.Space = idCMYKcolor
    myColor.Name = "Red"
    myColor.ColorValue = Array(0, 100, 100, 0)

Set myColor = myDocument.Colors.Add
    myColor.Model = idProcessColor
    myColor.Space = idCMYKcolor
    myColor.Name = "myYellow"
    myColor.ColorValue = Array(0, 5, 30, 0)

Set myGradient = myDocument.Gradients.Add
    Set myGradientStop = myGradient.GradientStops.Item(1)
    myGradientStop.StopColor = myDocument.Colors.Item("Red")

Set myGradientStop = myGradient.GradientStops.Item(2)
    myGradientStop.StopColor = myDocument.Colors.Item("myYellow")

myGradient.Name = "RedTomyYellow"

myTextFrame.FillColor = myDocument.Gradients.Item("RedTomyYellow")

Roberto
Technical Details
Message-ID: <1de9bbae.1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de9bbae.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,fd5b2b501446afcf
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-06-30 05:17:22 PST
From: "roberto soto" <roberto1soto@hotmail.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Add a gradation to a rectangle font
Message-ID: <1de9bbae.1@WebX.la2eafNXanI>
Date: Mon, 30 Jun 2003 05:07:04 -0700
References: <1de9bbae.-1@WebX.la2eafNXanI>
Lines: 37
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit