Article View: adobe.scripting.indesign
Article #18882Re: referencing color problem (AS)
From: Chris Baier
Date: Sun, 16 Feb 2003 17:03
Date: Sun, 16 Feb 2003 17:03
40 lines
1974 bytes
1974 bytes
I find this method a little too wordy.
This works:
set fill color of text frame 1 to color id 18 of document 1
but these don't:
set fill color of text frame 1 to color "Black" of document 1
set fill color of text frame 1 to swatch "Black" of document 1
this works:
tell document 1
set myColor to swatch "Black" of document 1
tell spread 1
set fill color of text frame 1 to myColor
end tell
end tell
and this works:
tell document 1
set myColor to swatch "Black" of document 1
set fill color of text frame 1 of spread 1 to swatch "Black"
end tell
and this does:
tell spread 1
set newFrame to make text frame with properties {geometric bounds:{"0p0", "0p0", "18p0", "18p0"}, contents:"The End", name:"TitleBox", fill color:color id 18 of document 1}
end tell
but this doesn't:
set newFrame to make text frame with properties {geometric bounds:{"0p0", "0p0", "18p0", "18p0"}, contents:"The End", name:"TitleBox", fill color:swatch "Black" of document 1}
It seems odd that I can refer to a color by it's ID # in the "spread" context but not by name in the same context.
Technical Details
Message-ID:
<1de79033.1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!easynet-quince!easynet.net!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!skynet.be!skynet.be!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de79033.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,3cbf4510efa89559 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-02-16 09:07:59 PST From: "Chris Baier" <chris.baier@us.pwcglobal.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!easynet-quince!easynet.net!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!skynet.be!skynet.be!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: referencing color problem (AS) Message-ID: <1de79033.1@WebX.la2eafNXanI> Date: Sun, 16 Feb 2003 09:03:04 -0800 References: <1de79033.-1@WebX.la2eafNXanI> Lines: 45 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit