Yup, you're right! Marked as answered!
That last one is not working though, or it is, but what I meant is for it to select the next key And jump he CTI. I tried combining the last two versions but: Result: undefined.
$.global.script_doSelectNextKeys || (script_doSelectNextKeys = function script_doSelectNextKeys(){ var comp = app.project.activeItem, props, n, p, idx, max=-Infinity; if (comp instanceof CompItem){ props = comp.selectedProperties; for (n=0; n<props.length; n++){ p = props[n]; if (p.numKeys && p.selectedKeys.length>0) max=Math.max(max, p.keyTime(p.selectedKeys[p.selectedKeys.length-1])); idx = p.selectedKeys[p.selectedKeys.length-1]; //(*) p.selected = false; //(*) p.setSelectedAtKey(Math.min(idx+1, p.numKeys), true); //(*) }; if (-Infinity<max) comp.time = max; }; return; }); script_doSelectNextKeys();
Oliver