Skip navigation
Sign in
InDesign SDK (Japan)
Adobe Community
>
International Forums
>
ジャパンフォーラム
>
InDesign SDK (Japan)
>
Discussions
Please enter a title.
You can not post a blank message. Please type your message and try again.
(pkun)
Currently Being Moderated
LayerColorの設定方法
Dec 3, 2007 6:39 PM
MacOS10.4.7
InDesignCS3
JavaScript
レイヤーの色を変えたいのですが
layObj_01 = app.activeDocument.layers.add();
layObj_01.LayerColor=[255,255,0];
でうまく行きません。
なぜでしょうか?
978 Views 1 Reply
Latest reply
: (by鴨), Dec 4, 2007 8:08 AM
Submit
Replies
Currently Being Moderated
1.
(by鴨)
,
Dec 4, 2007
8:08 AM
in reply to (pkun)
Report
当方、MacOS 10.4.9 InDesign CS2 ですが、たぶん同じだろうと思います。
pkun さんのJSを試してみたのですが、エラーメッセージはでないものの、レイヤーの色を変えることができませんでした。値としてUIColors Enumerationの中の値を入れても、同じくレイヤーの色を変えることはできませんでした。また、app.activeDocument.l ayers[0].LayerColor=UIColors.yellow;のように、既存のレイヤーの色を変えることも試みましたが、できませんで した。
しかし、次のように一旦プロパティを変数に入れ、その中のLayerColorの値を変えて書き戻すことで、レイヤーの色を変えることができました。
var layObj_01 = app.activeDocument.layers.add();
var temp = layObj_01.properties;
temp.layerColor = [255,255,0];
layObj_01.properties = temp;
Submit
|
Mark as:
Forum guidelines
Actions
View print preview
More Like This
Retrieving data ...
Bookmarked By (0)
View:
Everyone
Only Notes