Hi,
I want to fetch all Aframes information in an active doc whose layout has three columns for each page.
I wrote the code below:
#target framemaker
var doc = app.ActiveDoc;
if (doc.ObjectValid() == true) {
var page = doc.FirstBodyPageInDoc;
while (page.ObjectValid()) {
var graFrame = page.PageFrame.FirstGraphicInFrame;
while (graFrame.ObjectValid()) {
var subcol = graFrame.FirstSubCol;
while (subcol.ObjectValid()) {
var aFrame = subcol.FirstAFrame;
while (aFrame.ObjectValid()) {
alert(page.PageNum + " " + aFrame.Width); // display Info about Aframe
aFrame = aFrame.NextAFrame;
}
subcol = subcol.NextSubCol;
}
graFrame = graFrame.NextGraphicInFrame;
}
page = page.PageNext;
}
}
This code does not work correctly.
Alert message like below;
-----------------------------
0 1000
0 2000
1 2000
-----------------------------
The second alert, "0 2000" is undesirable, because this information about Aframe on page 1.
"var subcol" ignores the page.
Could you teach me how to fix it, please?
Thanks,
Koji Koike