The following method will allow you to move the time indicator to a specific place, but I couldn't figure out how (via script or the GUI) to grab the timestamp of a particular key frame. If you know how to do that it should be easy to then use the method below for the purpose you described (I don't know if PS provides that functionality or not). As r-bin mentioned, if you provided a sample .psd file it might help. #target photoshop setTimelineTime(2, 25, 30); function setTimelineTime(seconds, frame, frameRate) { var timelineReference = new ActionReference(); timelineReference.putProperty( s2t( "property" ), s2t( "time" )); timelineReference.putClass( s2t( "timeline" )); var timeDescriptor = new ActionDescriptor(); timeDescriptor.putInteger( s2t( "seconds" ), seconds ); timeDescriptor.putInteger( s2t( "frame" ), frame ); timeDescriptor.putDouble( s2t( "frameRate" ), frameRate ); var timelineDescriptor = new ActionDescriptor(); timelineDescriptor.putReference( c2t( "null" ), timelineReference ); timelineDescriptor.putObject( s2t( "to" ), s2t( "timecode" ), timeDescriptor ); executeAction( s2t( "set" ), timelineDescriptor, DialogModes.NO ); } function c2t (c) { return app.charIDToTypeID(c); } function s2t (s) { return app.stringIDToTypeID(s); }
... View more