Changing condition properties via ES
Hello fellows,
I am trying to change properties of a certain condition tag through extendscript.
For example, I'd like add a background color to the condition tag. So I came up with this (faulty) code: ![]()
The ES toolkit complains that UseBkColor and BkColor are "undefined", but according to the FM10 Object Reference, these are properties of CondFmt. What am I missing? Thank you for your inputs in advance!
#target framemaker
CondApplBcolor(doc, TestCond);
function CondApplBcolor (doc, TestCond)
{
var doc = app.ActiveDoc;
var TestCond = doc.GetNamedCondFmt(Insert);
if (TestCond.ObjectValid())
{
Props = TestCond.GetProps();
Bcolor_en = GetPropIndex(Props, UseBkColor);
Bcolor = GetPropIndex(Props, BkColor);
Props[Bcolor_en].propVal.ival = 1;
Props[Bcolor].propVal.sval ="Pale Green";
TestCond.SetProps (Props);
return(1);
}
}
