Try this,
var doc = app.activeDocument, _stories = doc.stories; for(var i=0;i<_stories.length;i++) { var _lines = _stories[i].lines; for(var j=0;j<_lines.length;j++) { if(_lines[j].words[-1].lines.length >=2) { alert(_lines[j].words[-1].contents) } } }
Regards,
Chinna