For anyone else that needs to know, heres how to get the current slected frame numbers...
var anim = Document.Animation;
var frames=anim.GetIndicesFromState(Context,'FRAME'); // selected frames
var text ='';
text += 'There are ' + frames.length + ' selected frames \r\n';
text += 'Their indexs are...\r\n';
for (var i = 0, end = Math.min(10,frames.length);i<end;i++){
text += frames[i] + (i==end-1?'':', ');
}
if (end<frames.length) text += '...';
Application.MessageBox(text, "", false);
...hope thats right ...seems to be