Tôi đã viết một kịch bản bởi vì tôi mệt mỏi với việc chỉnh sửa nó bằng tay, ở đây bạn đi.
//make a video timeline
// =======================================================
var idconvertTimeline = stringIDToTypeID( "convertTimeline" );
var desc4 = new ActionDescriptor();
executeAction( idconvertTimeline, desc4, DialogModes.NO );
var layerName = app.activeDocument.activeLayer.name;
var firstLayer = app.activeDocument.activeLayer;
//alert(layerName);
var secondLayerName;
var secondLayer;
var thirdLayerName;
var thirdLayer;
secondLayerName = layerName.replace("(1)","(2)");
//alert(secondLayerName);
secondLayer = app.activeDocument.layers.getByName(secondLayerName);
//alert(secondLayer);
// =======================================================
var idDplc = charIDToTypeID( "Dplc" );
var desc6 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref2 = new ActionReference();
var idanimationFrameClass = stringIDToTypeID( "animationFrameClass" );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref2.putEnumerated( idanimationFrameClass, idOrdn, idTrgt );
desc6.putReference( idnull, ref2 );
executeAction( idDplc, desc6, DialogModes.NO );
firstLayer.visible = false;
for(var i = 2; i < 38; i++){
var str = "(" + i + ")";
var str2 = "(" + (i+1) + ")";
thirdLayerName = secondLayerName.replace(str,str2);
//alert(thirdLayerName);
thirdLayer = app.activeDocument.layers.getByName(thirdLayerName);
//alert(thirdLayer);
// =======================================================
var idDplc = charIDToTypeID( "Dplc" );
var desc7 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref3 = new ActionReference();
var idanimationFrameClass = stringIDToTypeID( "animationFrameClass" );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref3.putEnumerated( idanimationFrameClass, idOrdn, idTrgt );
desc7.putReference( idnull, ref3 );
executeAction( idDplc, desc7, DialogModes.NO );
secondLayer.visible = false;
secondLayerName = thirdLayerName;
secondLayer = thirdLayer;
}