is it possible to request the location of a layer on the timeline
I need a simple script to make frame animation viable, a single keypress to swap between drawings on the timeline, select next layer-> find out where the layer is on the timeline-> move the timehead onto the layer's frame. the first and third part are relatively trivial with a scriptlistener.
but finding a layer's timecode on the timeline is hidden somewhere I cant find.
I have tried using this this guide to go through the top level objects [application, document, layer] to try and find it, and came up empty. the layer seemingly stores no data on its place in the timeline.
I have found this thread which gets closer to timeline variables with this script:
var r = new ActionReference();
r.putProperty(charIDToTypeID('Prpr'), stringIDToTypeID('frameCount'));
r.putClass(stringIDToTypeID('timeline'));
var ret = executeActionGet(r);
alert( ret.getInteger(stringIDToTypeID('frameCount')) ); //currentFrame, documentTimelineSettings, duration, enabled, frameCount, frameRate, hasMotion, workInTime, workOutTimebut I am unable to adjust this to see if the timeline stores more variables/objects than just these.
and finaly using script listeners I hit a dead end
var idmoveAllTime = stringIDToTypeID( "moveAllTime" );
var desc650 = new ActionDescriptor();
var idtimeOffset = stringIDToTypeID( "timeOffset" );
var desc651 = new ActionDescriptor();
var idseconds = stringIDToTypeID( "seconds" );
desc651.putInteger( idseconds, 0 );
var idframe = stringIDToTypeID( "frame" );
desc651.putInteger( idframe, -1 );
var idframeRate = stringIDToTypeID( "frameRate" );
desc651.putDouble( idframeRate, 30.000000 );
var idtimecode = stringIDToTypeID( "timecode" );
desc650.putObject( idtimeOffset, idtimecode, desc651 );
executeAction( idmoveAllTime, desc650, DialogModes.NO );this is a script of moving a layer one frame to the left on the timeline. and it somehow lacks all reference to other objects. it is a blank command as far as I can tell, with the code to make it work hidden in the back.
can anyone help find the "timeline" object proper? or wherever the layer's location on the timeline is stored.
//--------
and in case someone wants to follow along
s2t = stringIDToTypeID;
var r = new ActionReference();
r.putEnumerated(s2t('layer'), s2t('ordinal'), s2t('targetEnum'));
var d = new ActionDescriptor();
d.putReference(charIDToTypeID( "null" ),r)
d.putObject(s2t('object'), s2t('layerInfo'), executeActionGet(r));//
alert(executeAction(s2t('convertJSONdescriptor'), d).getString(s2t('json')));
var e = executeActionGet(r);
var str = ''
for (var i = 0; i < e.count; i++)
{ str += typeIDToStringID(e.getKey(i)) + ':' + e.getType(e.getKey(i)) + '\n' }
alert(str);this is the script im using to read through the objects ("layer") in this ocasion to get this readout of its contents which are suspiciously lacking timeline information :

