Where can I sort out the representation of the parts of the document structure?
For example, the following seems to represent all the tables in the document.
If I want to change only the width of all the tables in the current selected textFrame, how do I change it.
Confused again.
main();
function main() {
var myTables = app.activeDocument.textFrames.everyItem().tables.everyItem().getElements(),
len = myTables.length,
i, col, parentWidth, factor;
for (i = 0; i < len; i++) {
// Get the width of the text box that the form belongs to and divide it by the width of the form to get the zoom ratio.
parentWidth = myTables[i].parent.geometricBounds[3] - myTables[i].parent.geometricBounds[1];
factor = parentWidth / myTables[i].width;
//Nest a for-loop that applies scaling to each column width
for (col = 0; col < myTables[i].columns.length; col++) {
myTables[i].columns[col].width *= factor;
}
}
}And then there are these, which have never made sense.
Please advise, thank you.
All open documents.
Currently open document.
The currently selected textFrame.
All text boxes in the current document.
All tables in the current document.
The currently selected textFrame (article?) All tables in the current document.
The currently selected table.
The currently selected row.
All cells in the currently selected row.
The currently selected cell.
The currently selected row.
All the frames in the current text.
The current textFrame(article?) All the charts in the current text box (article?).
The currently selected frame.




