I don't think there is a short easy way to explain how to work with Action Manager( other than mining the scriptlistener log ). And there isn't much offical documentaion on using Action Manager. Here is how to get the number of frames and the framerate. function GetFrameCount(){ var ref = new ActionReference(); ref.putProperty( charIDToTypeID( 'Prpr' ), stringIDToTypeID( "frameCount" ) ); ref.putClass( stringIDToTypeID( "timeline" ) ); var desc = new ActionDescriptor(); desc.putReference( charIDToTypeID( 'null' ), ref ); var resultDesc = executeAction( charIDToTypeID( 'getd' ), desc, DialogModes.NO ); return resultDesc.getInteger( stringIDToTypeID( "frameCount" ) ); }; function GetFrameRate(){ var ref = new ActionReference(); ref.putProperty( charIDToTypeID( 'Prpr' ), stringIDToTypeID("documentTimelineSettings") ); ref.putClass( stringIDToTypeID( "timeline" ) ); var desc = new ActionDescriptor(); desc.putReference( charIDToTypeID( 'null' ), ref ); var resultDesc = executeAction( charIDToTypeID( 'getd' ), desc, DialogModes.NO ); return resultDesc.getDouble( stringIDToTypeID('frameRate') ); };
... View more