var tfs = app.activeDocument.textFrames.everyItem().getElements();
for (var i = 0; i < tfs.length; i++) {
var tf = tfs[i];
var line = tf.lines.lastItem();
if (line.isValid) {
var bottom = tf.geometricBounds[2] - tf.textFramePreferences.insetSpacing[2];
var baseline = line.baseline;
if (bottom - baseline > 0.1) {
$.writeln(tf.id);
}
}
}