I have the same problem in that I'm not a scripting person, but was able to get the above script working without problem, and it does set irregular table column widths perfectly, so thanks to Ramkumar. P for that.
BUT, it changes the column width for ALL tables in the document, whereas I would like to just target the selected table.
Any ideas as to how I might amend this script to achieve this?
var myDoc = app.activeDocument;
var myWidths = [100, 100, 150, 150];
for(var j=0; j < myWidths.length; j++)
app.selection.columns[j].width = myWidths[j];
Thank you for this - worked perfectly.
And, as a complete JS novice - very interesting to see the differences between the two scripts.
PS - I can't see an obvious way to mark this question as "answered" - sorry!