Hi all you big brains.
I know nothing about scripting but I've managed to amend a script an old work collegue did for me many moons ago. I need to be able to add the bleed amounts to the relevant parts of a slug made from a table:

I have text variables for the Ref (file name), Mod dates, Mod by and have a script for the width and height inputs:
// WORKING ON CURRENT DOCUMENT
var myDocument = app.activeDocument;
// INITIAL SETTINGS
myDocument.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;
myDocument.zeroPoint=[0,0];
myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.MILLIMETERS;
myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.MILLIMETERS;
// WORKING WITH ACTIVE PAGE
var currentPage = myDocument.layoutWindows[0].activePage;
var width, height; // SOME VARIABLES
// GETTING THE PAGE SIZES
width = currentPage.bounds[3] - currentPage.bounds[1];
height = currentPage.bounds[2] - currentPage.bounds[0];
// ROUND THE NUMBERS
var widthRounded = width.toFixed(2);
var heightRounded = height.toFixed(2);
var realHeight = heightRounded*10;
var realWidth = widthRounded*10;
var ShowType;
// WORKING WITH TABLES ON THE ACTIVE PAGE
var myTables = app.layoutWindows[0].activePage.textFrames.everyItem().tables;
// show row and column of selected cell
//alert(app.selection[0].parentRow.index+"\n"+app.selection[0].parentColumn.index);
// CHECK IF THERE IS THE SLUG IN THE DOCUMENT
if(myTables.length>0)
{
ShowType = "ORG-GARTNER";
// PLACE THE SIZES IN THE SLUG
myTables[0].cells[12].contents = (""+realWidth);
myTables[0].cells[13].contents = (""+realHeight);
}
If anyone could tell me what to add and where, I would be extremely grateful and send you a virtual donut.