Article View: adobe.scripting.indesign
Article #16414Re: (AS) a whose clause problem...
From: Jay Fraser
Date: Thu, 11 Sep 2003 17:47
Date: Thu, 11 Sep 2003 17:47
36 lines
1763 bytes
1763 bytes
Yup. Color seems to be a document thing. It's interesting: you can name a color in the "tell application" block, but it doesn't mean anything when you get into the tell document block.
tell application "InDesign 2.0.2"
set myYellow to color "C=0 M=0 Y=100 K=0"
tell active document
set myBox to make rectangle with properties {geometric bounds:{20, 20, 30, 30}, fill color:myYellow}
end tell
end tell
... gets me a blank box, even though the Event Log shows "C=0 M=0 Y=100 K=0" as color id 9. But
tell application "InDesign 2.0.2"
tell active document
set myYellow to color "C=0 M=0 Y=100 K=0"
set myBox to make rectangle with properties {geometric bounds:{20, 20, 30, 30}, fill color:myYellow}
end tell
end tell
... gets me a yellow box.
The other thing w/ that first line in Oli's script is that he left out the word "color"
set myColor to color "C=75 M=5 J=100 N=0"
One thing that I'm not sure about: is "color" and "swatch" synonymous?
Technical Details
Message-ID:
<2ccd655f.6@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeeds.sol.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccd655f.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,a5910cfa70e1f2a5 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-09-11 11:08:03 PST From: "Jay Fraser" <jayfraser@yahoo.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeeds.sol.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: (AS) a whose clause problem... Message-ID: <2ccd655f.6@webx.la2eafNXanI> Date: Thu, 11 Sep 2003 10:47:01 -0700 References: <2ccd655f.-1@webx.la2eafNXanI> Lines: 31 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit