Quantcast
Channel: Adobe Community : All Content - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 888

How to colorize AFrames

$
0
0

Hi,

 

I am trying the automatic processing below.

  • Add borders to Aframes
  • Colorize Aframes

 

Before:

before.jpeg

After:

after.jpeg

 

Adding borders succeeded, but I can't add colors to AFrames.

My script is below.

 

 

var doc = app.ActiveDoc;
if (doc.ObjectValid() == true) {  var colorFormat = doc.GetNamedObject(Constants.FO_Color, "Red");  var colorProps = colorFormat.GetProps();   var flow = doc.MainFlowInDoc;  var textFrame = flow.FirstTextFrameInFlow;  while (textFrame.ObjectValid()) {    var aFrame = textFrame.FirstAFrame;    while (aFrame.ObjectValid()) {      aFrame.Pen = 0;  //=> works!           aFrame.Color.SetProps(colorProps); //=> doesn't work...      aFrame.SetProps(colorProps); //=> doesn't work...      aFrame.Color.Name = "Red";  //=> doesn't work...      aFrame = aFrame.NextAFrame;    }    textFrame = textFrame.NextTextFrameInFlow;  }
}

 

Please teach me how to handle it.

 

Thanks,

 

Koji Koike


Viewing all articles
Browse latest Browse all 888

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>