<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ``` function writeReport(path, reportText) { var reportFile = new File(path ); //path + "/font_report.txt" if(reportFile.exists){ //alert('file already exists'); reportFile.open("w"); //reportFile.open("a"); //a是append模式 reportFile.write(reportText); reportFile.close(); } else{ var RCF_file = new File(reportFile); RCF_file.open("w"); RCF_file.write(reportText); RCF_file.close(); } //alert('Report Complete'); } //讀取txt文檔 var path = "D:/編輯0000文字.txt"; var myFile = new File(path); if (myFile != null) { // open file var fileOK = myFile.open("r"); if (fileOK){ var text; var arrayText = new Array(); while (!myFile.eof){ text = myFile.readln(); if (text == "") text = "\r" ; arrayText.push(text); } // close the file before exiting myFile.close(); } else{ alert("文件打開失敗!"); } }else{ alert("請先選擇txt文件."); } //獲取所有合成 var runType = 2; //1---正常運行 //2---檢測錯誤 @136@新郎:許鵬飛 //3---只文本 var str = ""; var index = 1; // 獲取當前激活的合成 var activeComp = app.project.activeItem; if (activeComp == null ) { alert("主合成沒有激活,請修改下AE模板"); } //----------第一層(最外面一層)開始 var curComp = activeComp; if (curComp != null && (curComp instanceof CompItem)) { //----------for numLayers 開始---------------------------- for (var i = 1; i <= curComp.numLayers; i++) { var curLayer = curComp.layer(i); if (curLayer.shy == true) continue; if (curLayer.sourceText == null ) //curLayer != null && (curLayer instanceof CompItem) { //----------第二層開始 if (curLayer.source == null) continue; var curComp2 = curLayer.source; //----------for numLayers 開始---------------------------- for (var i2 = 1; i2 <= curComp2.numLayers; i2++) { var curLayer2 = curComp2.layer(i2); if (curLayer2.shy == true) continue; if (curLayer2.sourceText == null ) //if (curLayer2 != null && (curLayer2 instanceof CompItem)) { } else { //---------sourceText開始----------------- //curLayer var sourceText2 = curLayer2.sourceText; if (sourceText2.numKeys == 0) { // textValue is a TextDocument. Retrieve the string inside var oldString2 = sourceText2.value.text; if(index <=arrayText.length ) { var newString = arrayText[index-1]; newString = newString.replace(/\@[^\)]*\@/g,""); //去掉@@ sourceText2.setValue(newString); } if(runType == 2) str = str + "@層名2:" + curLayer2.name + "@" +index.toString() + "@arrayText-" +arrayText.length.toString() + "@"+ oldString2 + "\r\n"; index++; } else { // Do it for each keyframe: for (var keyIndex2 = 1; keyIndex2 <= sourceText2.numKeys; keyIndex2++) { // textValue is a TextDocument. Retrieve the string inside var oldString2 = sourceText2.keyValue(keyIndex2).text; if(index <=arrayText.length ) { var newString = arrayText[index-1]; newString = newString.replace(/\@[^\)]*\@/g,""); //去掉@@ sourceText2.setValueAtKey(keyIndex2,newString); } if(runType == 2) str = str + "@層名2:" + curLayer2.name + "@" +index.toString() + "@arrayText-" +arrayText.length.toString() + "@"+ oldString2 + "\r\n"; index++; } } //---------sourceText結束----------------- } } //----------for numLayers 結束---------------------------- //----------第二層結束 } else { //---------sourceText開始----------------- //curLayer var sourceText = curLayer.sourceText; if (sourceText.numKeys == 0) { // textValue is a TextDocument. Retrieve the string inside var oldString = sourceText.value.text; //str = str + "@層名1:" + curLayer.name + "@" +index.toString() + "@"+ oldString + "\r\n"; if(index <=arrayText.length ) { var newString = arrayText[index-1]; newString = newString.replace(/\@[^\)]*\@/g,""); //去掉@@ sourceText.setValue(newString); } if(runType == 2) str = str + "@層名2:" + curLayer.name + "@" +index.toString() + "@arrayText-" +arrayText.length.toString() + "@"+ oldString + "\r\n"; index++; } else { // Do it for each keyframe: for (var keyIndex = 1; keyIndex <= sourceText.numKeys; keyIndex++) { // textValue is a TextDocument. Retrieve the string inside var oldString = sourceText.keyValue(keyIndex).text; //str = str + "@層名1:"+ "@" +index.toString()+"@" + oldString + "\r\n"; if(index <=arrayText.length ) { var newString = arrayText[index-1]; newString = newString.replace(/\@[^\)]*\@/g,""); //去掉@@ sourceText.setValueAtKey(keyIndex,newString); } if(runType == 2) str = str + "@層名2:" + curLayer.name + "@" +index.toString() + "@arrayText-" +arrayText.length.toString() + "@"+ oldString + "\r\n"; index++; } } //---------sourceText結束----------------- } } //----------for numLayers 結束---------------------------- } //----------第一層結束 //alert(str); writeReport ("D:/提取的字幕(批量替換記錄).txt", str); alert("提取字幕(批量替換記錄)成功,位置為 D:/提取的字幕(批量替換記錄).txt"); /* /* //獲取所有合成 var str = ""; var index = 1; for (var j = 1; j <= app.project.items.length; j++) { // Get the active comp //var activeItem = app.project.activeItem; var activeItem = app.project.item(j) ; //當前合成 if (activeItem != null && (activeItem instanceof CompItem)) { //all layers by zhenhuamcu var activeComp = activeItem; for (var i = 1; i <= activeComp.numLayers; i++) { var curLayer = activeComp.layer(i); var sourceText = curLayer.sourceText; if (sourceText != null) { if (sourceText.numKeys == 0) { // textValue is a TextDocument. Retrieve the string inside var oldString = sourceText.value.text; str = str + "@合成名:" + activeItem.name + "@層名:" + curLayer.name + "@" +index.toString() + "@"+ oldString + "\r\n"; index++; } else { // Do it for each keyframe: for (var keyIndex = 1; keyIndex <= sourceText.numKeys; keyIndex++) { // textValue is a TextDocument. Retrieve the string inside var oldString = sourceText.keyValue(keyIndex).text; str = str + "@" +index.toString()+"@" + oldString + "\r\n"; index++; } } } } } } */ ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看