I see, you have to make the shape to be able to query its Area.
here's a script that adds the offset path, you can delete it after getting the area if you don't need it.
Select ONE shape before running
// apply offset path to selected pathItem
//https://community.adobe.com/t5/illustrator/illustrator-javascript-count-area-with-offset/td-p/11564739?page=1
function main () {
var idoc = app.activeDocument;
var sel = idoc.selection[0];
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
var mm = 72/25.4;
var offset = 5*mm;
// offset path Effect with Round Joins
var xmlstringOffsetPath = '<LiveEffect name="Adobe Offset Path"><Dict data="R mlim 4 R ofst value I jntp 2 "/></LiveEffect>'; // 0 = round, 1=bevel, 2=miter
xmlstringOffsetPath = xmlstringOffsetPath.replace("value", offset);
idoc.selection = null;
var dup = sel.duplicate(sel, ElementPlacement.PLACEAFTER);
try {
dup.filled = false;
}
catch(e) {}
dup.selected = true; // select it before applying effects
// apply offset path Effect
dup.applyEffect(xmlstringOffsetPath);
app.redraw();
// expand appearance
app.executeMenuCommand ('expandStyle');
app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS;
}
main();
Carlos