function gg_AutomatedVideoEditing(u) { function p(ar, y, at) { this.scriptName = ar; this.scriptVersion = y; this.scriptUrl = at; } function X(bh) { function au() { bJ = new Window("dialog", aF + " v" + aB, undefined, { resizeable: true, }); if (bJ != null) { bK = "group { \t\t\t\torientation: 'column', \t\t\t\talignment: ['fill','fill'], \t\t\t\talignChildren: ['fill','fill'], \t\t\t\t\tinfoGrp: Group { \t\t\t\t\talignment: ['fill','top'], \t\t\t\t\talignChildren: ['fill','fill'], \t\t\t\t\torientation: 'column', \t\t\t\t\t\thdrGrp: Group {\t\t\t\t\t\t\ttxt: StaticText {}, \t\t\t\t\t\t\tpaste: StaticText {}, \t\t\t\t\t\t}\t\t\t\t\t\ttrial: StaticText {}, \t\t\t\t\t} \t\t\t\t\tlicGrp: Group { \t\t\t\t\t\ttxt: EditText {alignment: ['fill','fill'], properties:{multiline:false}}, \t\t\t\t\t} \t\t\t\t\tokGrp: Group { \t\t\t\t\talignment: ['fill','bottom'], \t\t\t\t\talignChildren: ['fill','fill'], \t\t\t\t\t\tretrieveReg: Button {text:'" + br + "', alignment: ['left','center'],preferredSize:[150,30]}\t\t\t\t\t\tcancelBtn: Button {text:'" + bj + "', preferredSize:[150,30], alignment: ['right','center']} \t\t\t\t\t\tokBtn: Button {text:'" + a8 + "', preferredSize:[150,30], alignment: ['right','center']} \t\t\t\t\t} \t\t\t\t}"; bJ.grp = bJ.add(bK); bL = ScriptUI.newFont("dialog || palette", ScriptUI.FontStyle.BOLD, 12); bI = ScriptUI.newFont( "dialog || palette", ScriptUI.FontStyle.REGULAR, 9 ); bJ.grp.licGrp.txt.preferredSize = [600, 30]; bJ.grp.infoGrp.hdrGrp.txt.text = aU; bJ.grp.infoGrp.hdrGrp.txt.graphics.font = bL; bJ.grp.infoGrp.hdrGrp.paste.text = a7; bJ.grp.infoGrp.hdrGrp.paste.graphics.font = bI; bJ.grp.infoGrp.trial.text = aM || !aO ? "" : a1; bJ.grp.licGrp.txt.text = aM || !aO ? "" : "trial"; bJ.grp.okGrp.retrieveReg.visible = !aM; bJ.grp.okGrp.retrieveReg.onClick = function () { bM = confirm(bq); if (bM) { ax(be); } }; bJ.grp.okGrp.cancelBtn.onClick = function () { bJ.close(false); }; bJ.grp.okGrp.okBtn.onClick = function () { bM = bJ.grp.licGrp.txt.text .replace(RegExp("^\\s\\s*", ""), "") .replace(RegExp("\\s\\s*$", ""), ""); app.settings.saveSetting(bv, bi, aD(bM)); app.settings.saveSetting(bv, a5, aB); app.preferences.saveToDisk(); bJ.close(true); }; bJ.layout.layout(true); bJ.layout.resize(); bJ.onResizing = bJ.onResize = function () { this.layout.resize(); }; return bJ; } } function by(bN) { bJ = false; bQ = new Date(); bK = 86400000; bP = (parseInt(bQ, 10) / bK / 1000000).toFixed(6); if (app.settings.haveSetting(aH, a3)) { bL = parseInt(app.settings.getSetting(aH, a3), 16) / 100000000000; } else { bL = bP; app.settings.saveSetting(aH, a3, (bL * 100000000000).toString(16)); } if (app.settings.haveSetting(aH, a2)) { bM = Math.max( 1, parseInt(app.settings.getSetting(aH, a2), 16) / 1000000000000 ); if (bN != "balance") { app.settings.saveSetting( aH, a2, ((bM + 1) * 1000000000000).toString(16) ); } } else { bM = 1; app.settings.saveSetting(aH, a2, (bM * 1000000000000).toString(16)); } app.preferences.saveToDisk(); bR = Math.max(0, parseInt(bQ, 10) / bK - bL * 1000000); clearOutput(); bO = bR > bw || bP < bL ? 0 : Math.ceil(bw - bR); bI = Math.max(0, aW - bM); if ((bR > bw && bM > aW) || bP < bL) { bJ = true; } if (bh != "c") { if (bO > 0 && bN != "balance") { writeLn(aA); writeLn(aJ.replace(RegExp("%E", "g"), bO)); } else { if (!bJ && bN != "balance") { writeLn(aA); writeLn(bc.replace(RegExp("%E", "g"), bI)); } } } if (bN == "balance") { return bO; } else { return bJ; } } function aQ(bM) { bN = false; bJ = new Date(); bI = 86400000; bL = parseInt(bJ, 10) / bI; bK = parseInt(bM, 10) / bI; if (bL > bK) { bN = true; } return bN; } function aK(bL) { bI = new Window("dialog", at, undefined, { resizeable: false }); if (bI != null) { bK = "group { \t\t\t\torientation: 'column', \t\t\t\talignment: ['fill','fill'], \t\t\t\talignChildren: ['fill','fill'], \t\t\t\t infoGrp: Group { \t\t\t\t alignment: ['fill','top'], \t\t\t\t alignChildren: ['fill','fill'], \t\t\t\t orientation: 'column', \t\t\t\t\t hdr: StaticText {}, \t\t\t\t\t info: StaticText {preferredSize:[800,40], properties:{multiline:true}}, \t\t\t\t\t url: StaticText {}, \t\t\t\t\t} \t\t\t\t\tokGrp: Group { \t\t\t\t\talignment: ['fill','bottom'], \t\t\t\t\talignChildren: ['fill','fill'], \t\t\t\t\t\tcancelBtn: Button {text:'" + bj + "', preferredSize:[150,30], alignment: ['right','center']} \t\t\t\t\t\tokBtn: Button {text:'" + a8 + "', preferredSize:[150,30], alignment: ['right','center']} \t\t\t\t\t} \t\t\t\t}"; bI.grp = bI.add(bK); bN = ScriptUI.newFont("dialog || palette", ScriptUI.FontStyle.BOLD, 12); bM = ScriptUI.newFont("dialog || palette", ScriptUI.FontStyle.BOLD, 11); bJ = ScriptUI.newFont( "dialog || palette", ScriptUI.FontStyle.REGULAR, 9 ); bI.grp.infoGrp.hdr.text = bB; bI.grp.infoGrp.hdr.graphics.font = bN; bI.grp.infoGrp.info.text = aG; bI.grp.infoGrp.url.text = aI; bI.grp.infoGrp.url.graphics.font = bM; bI.grp.okGrp.cancelBtn.onClick = function () { bI.close(false); }; bI.grp.okGrp.okBtn.onClick = function () { ax(aI); bI.close(true); }; bI.layout.layout(true); bI.layout.resize(); bI.onResizing = bI.onResize = function () { this.layout.resize(); }; return bI; } } function ba(bM) { bO = Folder.temp.fsName + "/" + Math.round(Math.random() * new Date().getTime() * 37915); if ($.os.indexOf("Win") != -1) { bK = bf; bO += ".exe"; } else { bN = system.callSystem("arch"); if (bN.toLowerCase().match(RegExp("ppc", "")) && aV == "") { alert(bz); return false; } bK = bN.toLowerCase().match(RegExp("ppc", "")) ? aV : aZ; } bJ = bD(File(bO), bK); bJ.hidden = true; if ($.os.indexOf("Mac") != -1) { system.callSystem("chmod 757 " + bJ.fsName); } bL = '"' + bJ.fsName + '" ' + bM + " " + a0; bI = system.callSystem(bL); bJ.remove(); return bI; } function bG(bI) { return ( bI.length * bI.charCodeAt(0) + bI.charCodeAt(Math.floor((bI.length - 1) * 0.1)) + bI.charCodeAt(Math.floor((bI.length - 1) * 0.2)) + bI.charCodeAt(Math.floor((bI.length - 1) * 0.3)) + bI.charCodeAt(Math.floor((bI.length - 1) * 0.4)) + bI.charCodeAt(Math.floor((bI.length - 1) * 0.5)) + bI.charCodeAt(Math.floor((bI.length - 1) * 0.7)) + bI.charCodeAt(Math.floor((bI.length - 1) * 0.8)) + bI.charCodeAt(Math.floor((bI.length - 1) * 0.9)) + bI.charCodeAt(bI.length - 1) ); } function bH(bI, bK) { bJ = bd(bI); if (aL && bJ) { updLicenseUI = aK(bI); bE = updLicenseUI.show(); } else { app.settings.saveSetting(bv, bi, aD("bad")); app.settings.saveSetting(bv, a5, aB); app.preferences.saveToDisk(); return false; } app.settings.saveSetting(bv, bi, aD("bad")); app.settings.saveSetting(bv, a5, aB); app.preferences.saveToDisk(); return bE; } function bd(bI) { bJ = bI.split("**"); if ( bI .replace(RegExp("^ +|| +$", "g"), "") .match(RegExp("^.+\\*\\*.+\\*\\*[0-9]+[A-Za-z]{3}$", "")) && bJ.length == 3 ) { return true; } else { alert(y); return false; } } function bg(bO, bJ, bM) { if (bJ != undefined) { bJ = bJ .replace(RegExp("^\\s\\s*", ""), "") .replace(RegExp("\\s\\s*$", ""), ""); } bk = false; if (bO) { bo = au(); bE = bo.show(); } else { bE = true; } bm = false; if (bE || (bJ && !bO)) { if (app.settings.haveSetting(bv, bi)) { bJ = app.settings.getSetting(bv, bi); } else { alert(aR); return bk; } bN = new RegExp("^.+\\*\\*.+\\*\\*[0-9]+[A-Za-z]{3}$"); if (aL && (bJ.match(bN) || bp(bJ).match(bN))) { if (bp(bJ).match(bN)) { bJ = bp(bJ); } bH(bJ, aG, bo); return bk; } bJ = bp(bJ); if (!aO || bJ.toLowerCase() != "trial") { bI = bJ.split("*"); if ( bJ.match( RegExp( "^[A-Z0-9]+\\*[^\\*]+\\*[^\\*]+\\*[0-9]+[A-Za-z]{3}[0-9]+$", "" ) ) && bI.length == 4 ) { bK = bI[3].match(RegExp("[A-Z]{3}[0-9]+$", "")); if (bK != null) { bk = bK[0]; if (bk.match("BTA") && !aM) { alert(bF); app.settings.saveSetting(bv, bi, aD("bad")); app.settings.saveSetting(bv, a5, aB); app.preferences.saveToDisk(); bg(bO); return false; } } else { alert(aC + "\n" + bb); app.settings.saveSetting(bv, bi, aD("bad")); app.settings.saveSetting(bv, a5, aB); app.preferences.saveToDisk(); bg(bO); return bk; } bQ = ba(bJ); if (parseInt(bQ, 10) == 1) { if (bO) { app.settings.saveSetting(bv, bi, aD(bJ)); app.preferences.saveToDisk(); bL = parseInt(bJ.match(RegExp("[0-9]$", "")), 10); alert( ar.replace("%u", bL + " user" + bL > 1 ? "s" : "") + !aM ? bl : "" ); } bm = true; app.settings.saveSetting(bv, a5, aB); app.preferences.saveToDisk(); } else { if (bO) { if (bQ.match(RegExp("After Effects warning: ERROR: ", "i"))) { alert(bC + "\n" + bb); } else { alert(aC + "\n" + bb); } app.settings.saveSetting(bv, bi, aD("bad")); app.settings.saveSetting(bv, a5, aB); app.preferences.saveToDisk(); bg(bO); return bk; } else { alert(aN); bO = true; app.settings.saveSetting(bv, bi, aD("bad")); app.settings.saveSetting(bv, a5, aB); app.preferences.saveToDisk(); bg(bO); return bk; } } } else { if (bJ.match(RegExp("^[A-Z]{2}[A-Z0-9]{30}$", ""))) { bP = confirm(bx); if (bs() && bP) { ax(a9 + "?serial=" + bJ); } app.settings.saveSetting(bv, bi, aD("bad")); app.settings.saveSetting(bv, a5, aB); app.preferences.saveToDisk(); return bk; } else { alert( aC + "\n" + !aM ? aE : aE.replace(RegExp("SUL", "g"), "BTA") + "\n\n" + bb ); bO = true; app.settings.saveSetting(bv, bi, aD("bad")); app.settings.saveSetting(bv, a5, aB); app.preferences.saveToDisk(); bg(bO); return bk; } } } else { if (!aM && !by()) { bk = aO ? "trial" : ""; bm = true; app.settings.saveSetting(bv, bi, aD("trial")); app.settings.saveSetting(bv, a5, aB); app.preferences.saveToDisk(); } else { if (aM) { alert(aY); app.settings.saveSetting(bv, bi, aD("bad")); app.settings.saveSetting(bv, a5, aB); app.preferences.saveToDisk(); return bk; } else { if (bh == "l") { bP = confirm(bu); if (bs() && bP) { ax(aI); } else { if (bP) { alert(aR); } } } } } } } return bk; } function bD(bK, bI) { bJ = bK; if (!bJ.exists) { bJ = new File(bJ.fsName); bJ.encoding = "BINARY"; bJ.open("w"); bJ.write(bI); bJ.close(); } return bJ; } function bp(bK) { bI = ""; bJ = 0; bK = bK.replace(RegExp("[^A-Za-z0-9\\+\\/\\=]", "g"), ""); bL = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; while (bJ < bK.length) { bR = bL.indexOf(bK.charAt(bJ++)); bP = bL.indexOf(bK.charAt(bJ++)); bN = bL.indexOf(bK.charAt(bJ++)); bM = bL.indexOf(bK.charAt(bJ++)); bS = (bR << 2) | (bP >> 4); bQ = ((bP & 15) << 4) | (bN >> 2); bO = ((bN & 3) << 6) | bM; bI = bI + String.fromCharCode(bS); if (bN != 64) { bI = bI + String.fromCharCode(bQ); } if (bM != 64) { bI = bI + String.fromCharCode(bO); } } return bI; } function aD(bK) { bI = ""; bJ = 0; bL = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; while (bJ < bK.length) { bS = bK.charCodeAt(bJ++); bQ = bK.charCodeAt(bJ++); bO = bK.charCodeAt(bJ++); bR = bS >> 2; bP = ((bS & 3) << 4) | (bQ >> 4); bN = ((bQ & 15) << 2) | (bO >> 6); bM = bO & 63; if (isNaN(bQ)) { bN = bM = 64; } else { if (isNaN(bO)) { bM = 64; } } bI = bI + bL.charAt(bR) + bL.charAt(bP) + bL.charAt(bN) + bL.charAt(bM); } return bI; } function bs() { bI = app.preferences.getPrefAsLong( "Main Pref Section", "Pref_SCRIPTING_FILE_NETWORK_SECURITY" ); return bI == 1; } function ax(bI) { bL = Folder.commonFiles.parent.fsName; bN = "explorer "; bJ = 'open "'; bK = '"'; if ($.os.indexOf("Windows") != -1) { bI = bI.replace(RegExp("&", "g"), "^&"); bM = 'cmd /c "' + bN + bI + '"'; system.callSystem(bM); } else { bM = bJ + bI + bK; system.callSystem(bM); } } function bn(bM, bS) { if (bS == undefined) { bS = "p"; } if (!aO || bM != "trial") { bL = bM.replace(RegExp("_", "g"), " "); bI = bL.split("*"); if (bI.length == 4) { bT = bI[1]; bW = bI[2]; bP = 0; bR = ""; bK = bI[3].match(RegExp("([A-Z]{3})([0-9]+)$", "")); if (bK != null && bK.length >= 3) { bR = bK[1]; bP = parseFloat(bK[2]); } bO = bT + bW.match(RegExp("^@", "")) ? "" : " " + bW; bJ = bR; if (bS == "v") { return bJ; } bU = bP > 1 ? " for " + bP + " Users" : " for 1 User"; switch (bJ) { case "SUL": bQ = " - License" + bU; break; case "Pro": bQ = " - Pro License" + bU; break; case "STE": bQ = " - Site License"; break; case "psr": bQ = " - Pro Site License"; break; case "BTA": bQ = " - Beta Test License"; break; case "EDU": bQ = " - Educational License"; break; default: bQ = " - Invalid License"; break; } bV = bO + " " + bQ; } else { bV = "License is invalid"; } } else { bN = by("balance"); bV = "Trial (" + bN + " days left)"; } return bV; } bA = 2.53; if (bh == undefined) { bh = "l"; } aX = k.scriptName; aB = k.scriptVersion; aI = k.scriptUrl; a0 = 218002; az = "http://aescripts.com/contact"; aO = true; bw = 7; aW = 7; aL = false; a4 = true; be = "https://aescripts.com/downloadable/customer/products/"; a9 = "https://license.aescripts.com/exchange"; aM = false; aP = new Date(2013, 2, 1); if ($.os.indexOf("Mac") != -1) { aZ = ""; aV = ""; } else { bf = ""; } bx = localize({ de: "Du hast eine tempor\xe4re Seriennummer eingegeben, die gegen eine permanente Lizenz eingetauscht werden muss.\n\nSobald Du eine permanente Lizenz erhalten hast, kannst Du sie verwenden um" + aX + " zu registrieren. Der Austausch ist schnell und unkompliziert, gehe einfach zu:\n\n" + a9 + "\n\nWillst Du jetzt dorthin gehen?", en: "You entered a temporary serial number that needs to be exchanged for a permanent license.\n\nOnce you obtain your permanent license you can use it to register " + aX + ". It is quick and easy to exchange it, simply go to:\n\n" + a9 + "\n\nWould you like to go there now?", es: "Ha introducido un n\xfamero de serie provisional que necesita ser sustituido por una licencia permanente.\n\nUna vez obtenga una licencia permamente puede usarla para registrar " + aX + ". Reemplazarla es r\xe1pido y sencillo, simplemente vaya a:\n\n" + a9 + "\n\n\xbfQuiere ir all\xed ahora?", fr: "Vous avez entr\xe9 un num\xe9ro de s\xe9rie temporaire devant \xeatre \xe9chang\xe9 contre une licence permanente.\n\nUne fois votre licence permanente acquise, vous pouvez l'utiliser pour vous enregistrer " + aX + ". Le changement est rapide et facile, allez simplement \xe0:\n\n" + a9 + "\n\nVoulez-vous y aller maintenant?", }); bu = localize({ de: "Die Testversion des Skriptes ist leider abgelaufen.\nDu kannst unter " + aI + " eine Lizenz erwerben.\n\nM\xf6chtest Du jetzt dorthin gehen?", en: "Sorry, this trial version of the script has expired. \nYou can purchase a license at " + aI + "\n\nWould you like to go there now?", es: "Lo siento, esta versi\xf3n de prueba del script ha expirado.\nPuede obtener una licencia en" + aI + "\n\n\xbfQuiere ir all\xed ahora?", fr: "D\xe9sol\xe9, la p\xe9riode d'essai du script a expir\xe9.\nPour acheter une licence, veuillez vous rendre sur la page " + aI + "\n\nVoulez-vous ouvrir cette page maintenant ?", }); bt = localize({ de: "Die Betaversion des Skriptes ist leider abgelaufen", en: "Sorry, this beta version of the script has expired", es: "Lo siento est\xe1 versi\xf3n beta del script ha expirado", fr: "D\xe9sol\xe9, la p\xe9riode beta du script a expir\xe9", }); bF = localize({ de: "Beta Lizenzcode erkannt f\xfcr " + aX + "\nBeta Lizenzen k\xf6nnen nur f\xfcr Betaversionen verwendet werden. Bitte verwende eine normale Lizenz f\xfcr diese Version.", en: "Beta license code detected for " + aX + "\nBeta license codes can only be used on beta versions, please obtain a normal license to use this version.", es: "Licencia beta detectada para " + aX + "\nLas licencias beta s\xf3lo pueden ser usadas con versiones beta, por favor obtenga una licencia normal para usar esta versi\xf3n.", fr: "Licence beta d\xe9tect\xe9e pour " + aX + "\nLes codes pour licence beta ne peuvent \xeatre utilis\xe9s que pour les versions beta, merci de demander une licence r\xe9guli\xe8re pour utiliser cette version.", }); aY = localize({ de: "F\xfcr diese Betaversion wird eine Lizenz ben\xf6tigt.\nBitte kontaktiere den Autor f\xfcr eine Betatester-Lizenz.", en: "A license is required to run this beta version\nPlease contact the author for a beta testing license.", es: "Es necesaria una licencia para utilizar esta versi\xf3n beta.\nPor favor, p\xf3ngase en contacto con el autor para obtener una licencia beta.", fr: "Une licence est requise pour ex\xe9cuter cette version beta\nMerci de contacter l'auteur pour une licence beta de test.", }); ar = localize({ de: "Registrierung erfolgreich f\xfcr %u\n", en: "Registration successful for %u\n", es: "Registro completado al %u\n", fr: "Enregistrement r\xe9ussi pour %u\n", }); bl = localize({ de: "Danke f\xfcr den Kauf von " + aX, en: "Thank you for purchasing " + aX, es: "Gracias por comprar " + aX, fr: "Merci d'avoir achet\xe9 " + aX, }); aC = localize({ de: "Entschuldigung, der Lizenzcode ist nicht g\xfcltig.", en: "Sorry, the license code is not valid", es: "Lo siento, la licencia no es v\xe1lida", fr: "D\xe9sol\xe9, ce num\xe9ro de licence n'est pas valide.", }); bC = localize({ de: "Eine Firewall oder ein Antivirus-Programm blockiert den Lizenz-Prozess. Bitte deaktiviere das Antivirus-Programm oder konfiguriere das System so, dass die Lizenz verifiziert werden kann.", en: "A firewall or virus protection software is blocking the licensing process. Please disable this or configure it to allow this process so that the license can be verified.", es: 'Un software de "firewall" o de protecci\xf3n antivirus est\xe1 bloqueando el proceso de concesi\xf3n de licencias. Desactivela o configurela para permitir este proceso para que la licencia puede ser verificada.', fr: "Un logiciel pare-feu ou un logiciel antivirus bloque le processus de v\xe9rification de licence. Veuillez le d\xe9sactiver ou le configurer pour permettre \xe0 ce processus de v\xe9rifier la licence.", }); bb = localize({ de: "Wenn Du Hilfe ben\xf6tigst, kontaktiere bitte " + az, en: "If you require assistance please contact " + az, es: "Si necesita ayuda, por favor contacte " + az, fr: "Si vous avez besoin d'aide, merci de contacter " + az, }); aN = localize({ de: "Entschuldigung, irgendetwas ist mit dem " + aX + " Lizenzcode passiert. Bitte gebe ihn erneut ein.\n\n" + bb, en: "Sorry, something must have happened to the " + aX + " license code. Please re-enter it at the prompt.\n" + bb, es: "Lo siento, algo ha ocurrido con la licencia de " + aX + ". Por favor, vuelva a introducirla en la casilla.\n" + bb, fr: "D\xe9sol\xe9, il y a eu un probl\xe8me avec le num\xe9ro de licence pour " + aX + ". Merci de bien vouloir le saisir \xe0 nouveau.n\n" + bb, }); aA = localize({ de: "Danke, dass Du " + aX + " ausprobierst!", en: "Thanks for trying " + aX + "!", es: "\xa1Gracias por probar " + aX + "!", fr: "Merci d'avoir essay\xe9 " + aX + "!", }); aJ = localize({ de: "%E Tage \xfcbrig f\xfcr die Testversion", en: "%E days left in the trial", es: "%E d\xedas de prueba restantes", fr: "Il vous reste %E jours d'essai", }); bc = localize({ de: "%E Programmstarts \xfcbrig f\xfcr die Testversion", en: "%E launches left in the trial", es: "%E usos restantes de la versi\xf3n de prueba", fr: "Il vous reste %E essais", }); aF = localize({ de: "Willkommen bei " + aX, en: "Welcome to " + aX, es: "Bienvenido a " + aX, fr: "Bienvenue sur " + aX, }); a8 = localize({ de: "OK", en: "OK", es: "OK", fr: "OK" }); bj = localize({ de: "Abbrechen", en: "Cancel", es: "Cancelar", fr: "Annuler", }); br = localize({ de: "Lizenz vergessen?", en: "Retrieve License", es: "Recuperar licencia", fr: "Retrouver votre Licence", }); bz = localize({ de: "PowerPC (PPC) Prozessoren werden leider nicht unterst\xfctzt. Bitte kontaktiere den Support f\xfcr weitere Informationen.", en: "Sorry, PowerPC (PPC) processors are not supported, please contact support for further assistance.", es: "Lo siendto, los procesadores PowerPC (PPC) no est\xe1n soportados, por favor contacte con soporte para m\xe1s informaci\xf3n.", fr: "D\xe9sol\xe9, les processeurs PowerPC (PPC) ne sont pas support\xe9s, veuillez contacter le service client\xe8le pour plus de d\xe9tails.", }); aR = localize({ de: 'Dieses Skript ben\xf6tigt die Erlaubnis Dateien zu schreiben.\n Gehe in Voreinstellungen von After Effects in die Rubrik "Allgemein" und aktiviere die Option "Skripten k\xf6nnen Dateien schreiben und haben Netzwerkzugang".', en: 'This script requires access to write files.\nGo to the "General" panel of the application preferences and make sure "Allow Scripts to Write Files and Access Network" is checked.', es: 'Este script necesita poder escribir archivos.\nVaya al panel "General" de las Preferencias y aseg\xfarese de que "Permitir que los scripts puedan escribir archivos y acceder a la red" est\xe1 marcado.\n', fr: 'Ce script n\xe9cessite les droits d\'\xe9criture de fichiers.\nAllez dans le panneau "G\xe9n\xe9ral" des pr\xe9f\xe9rences de l\'application et cochez \n"Autoriser les scripts \xe0 \xe9crire des fichiers et \xe0 acc\xe9der au r\xe9seau"', }); at = localize({ de: aX + " Lizenz-Update ben\xf6tigt", en: aX + " License Update Required", es: aX + " necesita actualizar la licencia", fr: "La licence de " + aX + " doit \xeatre mise \xe0 jour", }); bq = localize({ de: "Alle Deine Lizenzen findest Du unter 'My Licenses & Downloads' in Deinem aescripts.com Benutzer-Account.\n\nBenutzer-Accounts sind Teil des neuen aescripts.com. Wenn Du noch keinen Account erzeugt hast, erzeuge einen neuen Account mit der selben Email-Adresse, die Du f\xfcr Deine bisherigen K\xe4ufe verwendet hast. Diese weden dann automatisch importiert.\n\nWillst Du jetzt dorthin gehen?", en: "All your licenses are in the 'My Licenses & Downloads' section of your aescripts.com user account.\n\nUser accounts are part of the new aescripts.com. If you have not created an account yet, create a new account using the same email address you used for the original purchase and your order history will be imported.\n\nWould you like to go there now?", es: "Todas sus licencias est\xe1n en la secci\xf3n 'My Licenses & Downloads' de su cuenta de usuario en aescripts.com.\n\nLas cuentas de usuario son parte del nuevo aescripts.com. Si no ha creado una cuenta a\xfan, cree una nueva utilizando el mismo correo electr\xf3nico usado para la compra original y su historial de compras ser\xe1 importado.\n\n\xbfQuiere ir all\xed ahora?", fr: "Toutes vos licences se trouvent dans la section 'My Licenses & Downloads' de votre compte utilisateur sur aescripts.com.\n\nLes comptes d'utilisateurs font partie de la nouvelle version de aescripts.com. Si vous n'avez pas encore cr\xe9\xe9 de compte, cr\xe9ez un nouveau compte en utilisant la m\xeame adresse email que vous avez utilis\xe9e pour l'achat initial et l'historique des commandes sera import\xe9.\n\nVoulez-vous y aller maintenant?", }); bB = a4 ? localize({ de: "Anscheinend hast Du eine alte Lizenz-Nummer. " + aX + " v" + aB + " ist ein kostenpflichtiges Upgrade. Es ist f\xfcr Kunden, welche die entsprechenden Vorraussetzungen erf\xfcllen, zu einem reduzierten Preis verf\xfcgbar.", en: "Looks like you have an old license number. " + aX + " v" + aB + " is a major new paid upgrade available at a discount for qualifying customers.", es: "Parece que tiene una licencia antigua. " + aX + " v" + aB + " es una nueva actualizaci\xf3n principal disponible con descuento para clientes seleccionados.", fr: "Il semblerait que vous disposiez d'un ancien num\xe9ro de licence. " + aX + " v" + aB + " est une importante nouvelle mise \xe0 niveau payante disponible avec remise pour les clients \xe9ligibles.", }) : localize({ de: "Anscheinend hast Du eine alte Lizenz-Nummer. " + aX + " v" + aB + " ist ein neues Upgrade. Es ist f\xfcr Kunden, welche die entsprechenden Vorraussetzungen erf\xfcllen, KOSTENLOS.", en: "Looks like you have an old license number. " + aX + " v" + aB + " is a new upgrade available for FREE to qualifying customers.", es: "Parece que tiene una licencia antigua. " + aX + " v" + aB + " es una nueva actualizaci\xf3n principal GRATUITA para cliente seleccionados.", fr: "Il semblerait que vous disposiez d'un ancien num\xe9ro de licence. " + aX + " v" + aB + " est une nouvelle mise \xe0 niveau disponible GRATUITEMENT pour les clients \xe9ligibles.", }); aG = localize({ de: "Du kannst Deine Lizenz schnell und einfach upgraden. Nachdem Du OK geklickt hast, wirst Du auf die Seite von " + aX + " auf aescripts.com weitergeleitet. Melde Dich an oder erzeuge einen neuen Account um zu sehen, ob Du f\xfcr ein Upgrade berechtigt bist.Wenn Du einen neuen Account erzeugst, verwende die selbe Email-Adresse, wie f\xfcr Deine bisherigen K\xe4ufe. Wenn Du lieber selbst auf die Webseite gehen m\xf6chtest, klicke auf abbrechen und besuche diese Webseite:", en: "It is quick and easy to upgrade your license. After pressing OK, you will be sent to the " + aX + " page on aescripts.com. Login or create a new account to see if you qualify for an upgrade. Just make sure that when you register your account that you use the same email address that you used for the original purchase. If you prefer to go on your own, press cancel and visit this page:", es: "Actualizar su licencia es r\xe1pido y sencillo. Despu\xe9s de pulsar OK, ser\xe1 redireccionado a la p\xe1gina de " + aX + " en aescripts.com. Acceda o cree una nueva cuenta para saber si cumple con los requisitos para una actualizaci\xf3n. Aseg\xfarese de que cuando se registre usa el mismo correo electr\xf3nico que en la compra original. Si prefiere ir por su cuenta, presione Cancelar y visite la p\xe1gina:", fr: "Il est rapide et facile de mettre \xe0 niveau votre licence. Apr\xe8s avoir cliqu\xe9 sur OK, vous serez redirig\xe9 vers la page " + aX + " sur aescripts.com. Connectez vous et cr\xe9ez un nouveau compte pour voir si vous \xeates \xe9ligible pour une mise \xe0 niveau. Assurez vous lors de votre inscription que vous utilisez la m\xeame adresse email que vous avez utilis\xe9e pour l'achat initial. Si vous pr\xe9f\xe9rez le faire vous-m\xeame, appuyez sur Annuler et consultez cette page:", }); y = localize({ de: "Die Lizenz sollte so aussehen:\n\nFirstname**Lastname**111111111SUL", en: "License should look like this:\n\nFirstname**Lastname**111111111SUL", es: "La licencia debe tener este aspecto:\nNombre**Apellido**111111111SUL", fr: "Votre licence doit \xeatre similaire \xe0 : \n\nPr\xe9nom**Nom**111111111SUL", }); aE = localize({ de: "Die Lizenz sollte so aussehen:\n\nPRODUCTID*FIRSTNAME*LASTNAME*1111111SUL1", en: "License should look like this:\n\nPRODUCTID*FIRSTNAME*LASTNAME*1111111SUL1", es: "La licencia debe tener este aspecto:\nPRODUCTID*NOMBRE*APELLIDO*1111111SUL1", fr: "Votre licence doit \xeatre similaire \xe0 : \n\nPRODUCTID*PRENOM*NOM*1111111SUL1", }); aw = localize({ de: "Registriert f\xfcr: ", en: "Registered to: ", es: "Registrado a: ", fr: "Enregistr\xe9 pour: ", }); bv = "aescripts"; bi = aX + "_Registration"; a5 = aX + "_Version"; if ($.os.indexOf("Mac") != -1) { ay = "\u2318"; } else { ay = "Ctrl"; } aU = localize({ de: "Bitte gebe den Lizenzcode ein.", en: "Please enter the license code.", es: "Por favor, introduzca el c\xf3digo de licencia.", fr: "Veuillez entrer votre num\xe9ro de licence.", }); a7 = localize({ de: "(Wenn das Einf\xfcgen mit " + ay + "+V nicht funktioniert, versuche Bearbeiten->Einf\xfcgen.)", en: "(If pasting the code with " + ay + "+V doesn't work try " + parseFloat(app.version) >= 10 ? "Right-Click and Paste)" : "Edit->Paste)", es: "(Si pegar la licencia usando " + ay + "+V no funciona, pruebe " + parseFloat(app.version) >= 10 ? "Clic derecho y pegar)" : "Edici\xf3n->Pegar)", fr: "(Si vous ne parvenez pas \xe0 coller le code avec " + ay + "+V essayez " + parseFloat(app.version) >= 10 ? "Clique droit et Coller)" : "Edition->Coller)", }); a1 = localize({ de: 'Um die Testversion zu starten, gebe "trial" ein.', en: "To run in trial mode type: trial\n", es: "Para ejecutar el modo Trial, escriba: trial\n", fr: "Pour lancer la version de d\xe9monstration, tapez : trial\n", }); aH = "Initialization Fragments"; a3 = ( bG( Math.floor(parseFloat(app.version)) .toString() .charAt( Math.max( 0, Math.floor(parseFloat(app.version)).toString().length - 1 ) ) + aX.substring(Math.max(0, aX.length - 15), aX.length) + aB ) * a0 * 0.457 ).toString(36); a2 = ( bG( Math.floor(parseFloat(app.version)) .toString() .charAt( Math.max( 0, Math.floor(parseFloat(app.version)).toString().length - 1 ) ) + aX.substring(Math.max(0, aX.length - 15), aX.length) + aB ) * (a0 / 3.981) ).toString(36); if (!bs()) { alert(aR); app.executeCommand(2359); if (!bs()) { return; } } if (aM && aQ(aP)) { if (bh == "l") { alert(bt); } return; } if (bh == "l" || bh == "c") { if (app.settings.haveSetting(bv, bi)) { av = app.settings.getSetting(bv, bi); if ( bh != "c" && (av == "bad" || bp(av) == "bad" || (aO && bp(av) == "trial")) ) { a6 = true; } else { a6 = false; } aS = bg(a6, av, a0); } else { if (bh == "c") { av = aO ? "trial" : ""; app.settings.saveSetting(bv, bi, aD(av)); app.settings.saveSetting(bv, a5, aB); app.preferences.saveToDisk(); a6 = false; } else { a6 = true; } aS = bg(a6, av, a0); } return aS; } else { if (app.settings.haveSetting(bv, bi)) { av = bp(app.settings.getSetting(bv, bi)); aT = bn(av, bh); } else { aT = aO ? bn("trial", bh) : bn("", bh); } return bh == "p" ? aw : "" + (bh == "v") && aT.match("Trial") ? "trial" : aT; } return aS; } ah = 0; W = 0; z = 0.3; k = new p( "Automated Video Editing", "1.03", "http://aescripts.com/automated-video-editing" ); k.strAbout1 = k.scriptName + " v" + k.scriptVersion + "\nCopyright \xa9 2014 Gilad Glasberg\n"; k.strAbout2 = "This version compatible with Adobe After Effects CS6 and above.\n\nSTEP 1: LAYOUT SETTING\n1. Choose comp size and frame rate.\n2. Press the 'Create Composition' button (You can modify comp size and fps throw the script UI as much as you want).\n3. Import one music file, put it inside the '###Music' folder created by the script, only one file/song in this folder.\n4. Import video files into the '###Video' folder (minimum of 4 files).\n\nSTEP 2: VIDEO EDITING\n5. Color Style, just pick one if you want or leave it as it is and it will not take effect.\n6. Color Correction, you can choose to add automatic color correction (Auto Color and Auto Contrast AE effects) to all video layers.\n7. Video Cut, the speed of the cut-to-cut between each video cut, you may choose the speed you want.\n8. Video Scale, you have the option to let the script automatically scale (uniform scale) all the shots to the comp size.\n9. Write Title (Optional), in case you want a title animation for the clip, just write it inside, maximum character is around 30.\n10. You can choose 'Random' for random video scene, You can choose 'Repeat' to repeat footage until the end of the music file, You also have the option to Limit Shot Duration by seconds (for maximum duration) and milliseconds (for minimum duration), please be noted that this option will override the automatic beat edit in specific areas on the comp, to achieve a better result try to play with both the 'Video Cut' option and the 'Limit Shot Duration'.\n\nSTEP 3: READY TO GO\n11. Press the 'Do it' button, it will take around 10 seconds to finish the operation, depending on your computer speed.\n12. You should receive an alert box in the end of the process 'Process Completed Successfully'.\n13. Now it's ready to render, but in case you want you can repeat the process again and modify/tweak everything in the UI without loading the assets or the script again.\n\nIf you encounter a problem that doesn't seem to have a solution, open a new project and restart the script."; function ae(av) { function y(ax) { ay = ax.split("."); if (ay[2] != null) { ay[2] = ay[2].replace(RegExp("x", ""), "."); } return ay; } aw = y(av); ar = y(app.version); at = false; for (au = 0; au < ar.length; au = au + 1) { at = parseFloat(ar[au]) >= parseFloat(aw[au]); if (!at) { return at; } } return at; } A = "CGPersia"; k.strAboutReg = A; k.isTrial = false; if (ae("11.0.0.0")) { h = true; } else { h = false; } if (app.isoLanguage.match(RegExp("en_", ""))) { T = app.findMenuCommandId("Convert Audio to Keyframes"); } else { if (ae("12.0.0.0")) { an = true; } else { an = false; } if (an == true) { if (ae("13.2.0.0")) { T = 5015; } else { if (ae("13.1.0.0")) { T = 5017; } else { if (ae("13.0.0.0")) { T = 5015; } else { T = 5014; } } } } else { if (ae("11.0.4.2")) { T = 5015; } else { T = 5014; } } } if (h == true) { function w(ar) { y = ar instanceof Panel ? ar : new Window( "palette", k.scriptName + " v" + k.scriptVersion, undefined, { resizeable: true } ); res = "group{orientation:'column', alignment:['left', 'top'], alignChildren:['fill', 'fill'], helpButton: Button{text:'Instruction / Help',orientation:'row', alignment:['fill', 'top']}, myPanel: Panel{text:'STEP 1: LAYOUT SETTING',orientation:'column', alignment:['fill', 'top'], alignChildren:['left', ''], groupOne: Group{orientation:'row', alignment:['right', 'top'], alignChildren:['left', ''], compSizeText: StaticText{text:'Comp Size: '}, myDropDownList_1: DropDownList{properties:{items:['4K', '2K', '1080p', '720p', 'PAL DV', 'NTSC DV']}, preferredSize: ['80', '20']}, }, groupTwo: Group{orientation:'row', alignment:['right', 'top'], alignChildren:['left', ''], compSizeText: StaticText{text:'Frame Rate: '}, myDropDownList_2: DropDownList{properties:{items:['23.976', '24', '25', '29.97', '30', '50', '59.94', '60', '120']}, preferredSize: ['80', '20']}, }, myButton: Button{text:'Create Composition', alignment:['right', 'top']}, }, myPanel_Style: Panel{text:'STEP 2: VIDEO EDITING',orientation:'column', alignment:['fill', 'top'], alignChildren:['left', ''], groupOne: Group{orientation:'row', alignment:['right', 'top'], alignChildren:['left', ''], colorStyleText: StaticText{text:'Color Style: '}, myDropDownList_3: DropDownList{properties:{items:['None', 'Red', 'Green', 'Blue']}, preferredSize: ['92', '20']}, }, groupAutoColor: Group{orientation:'row', alignment:['right', 'top'], alignChildren:['left', ''], autoColorContrast: StaticText{text:'Color Correction: '}, myDropDownList_autoColorContrast: DropDownList{properties:{items:['No', 'Yes']}, preferredSize: ['92', '20']}, }, groupTwo: Group{orientation:'row', alignment:['right', 'top'], alignChildren:['left', ''], videoCutText: StaticText{text:'Video Cut Speed: '}, myDropDownList_4: DropDownList{properties:{items:['5 (Fastest)', '4', '3', '2', '1 (Slowest)']}, preferredSize: ['92', '20']}, }, groupTwoScale: Group{orientation:'row', alignment:['right', 'top'], alignChildren:['left', ''], videoCutText: StaticText{text:'Video Scale: '}, myDropDownList_4: DropDownList{properties:{items:['LetterBox', 'Crop', 'None']}, preferredSize: ['92', '20']}, }, groupThree: Group{orientation:'row', alignment:['right', 'top'], alignChildren:['left', ''], myStaticText_1: StaticText{text:'Write Title: ', alignment:['right', 'top']}, myEditText: EditText{text:'My Title', alignment:['right', 'top']}, }, groupOption1: Group{orientation:'row', alignment:['left', 'top'], alignChildren:['left', ''], myCheckBox_Random: Checkbox{text:'Random Video', alignment:['right', 'top']}, myCheckBox_Repeat: Checkbox{text:'Repeat Video', alignment:['right', 'top']}, }, groupOption2: Group{orientation:'row', alignment:['left', 'top'], alignChildren:['left', ''], myCheckBox_LimitShot: Checkbox{text:'Limit Shot Duration', alignment:['right', 'top']}, }, groupOption3: Group{orientation:'row', alignment:['fill', 'top'] mySliderText: StaticText{text:'', alignment:['left', 'top'], characters:16}, mySlider: Slider{text:'my slider', value:10, maxvalue: 20, minvalue: 3,alignment:['right', 'top']}, }, groupOption4: Group{orientation:'row', mySliderText: StaticText{text:'', alignment:['fill', 'top'], characters:16}, mySlider: Slider{text:'my slider', value: 0.30, maxvalue: 2, minvalue: 0,alignment:['right', 'top']}, }, }, myPanel_GO: Panel{text:'STEP 3: READY TO GO',orientation:'column', alignment:['fill', 'top'], alignChildren:['left', ''], myButton_Go: Button{text:'Do it', alignment:['right', 'top']}, }, }"; y.grp = y.add(res); autoColor_Contrast = y.grp.myPanel_Style.groupAutoColor.myDropDownList_autoColorContrast; autoColor_Contrast.selection = 1; B = y.grp.myPanel_Style.groupOne.myDropDownList_3; B.selection = 0; Y = y.grp.myPanel_Style.groupTwo.myDropDownList_4; Y.selection = 1; scaleChange = y.grp.myPanel_Style.groupTwoScale.myDropDownList_4; scaleChange.selection = 0; r = y.grp.myPanel_Style.groupThree.myEditText; r.size = [92, 20, 0, 0]; helpME = y.grp.helpButton; U = y.grp.myPanel_GO.myButton_Go; myRandom = y.grp.myPanel_Style.groupOption1.myCheckBox_Random; myRepeat = y.grp.myPanel_Style.groupOption1.myCheckBox_Repeat; Q = y.grp.myPanel_Style.groupOption2.myCheckBox_LimitShot; Q.value = true; K = y.grp.myPanel_Style.groupOption3.mySlider; ag = y.grp.myPanel_Style.groupOption3.mySliderText; secondsTo01 = Math.round(K.value); secondsTo02 = secondsTo01.toString(); ag.text = "Max Seconds: " + secondsTo02 + "s"; min_limitShotSlider = y.grp.myPanel_Style.groupOption4.mySlider; min_limitShotText = y.grp.myPanel_Style.groupOption4.mySliderText; min_secondsTo01 = min_limitShotSlider.value; min_secondsTo02 = min_secondsTo01.toString(); min_limitShotText.text = "Min Seconds: " + min_secondsTo02 + "s"; D = y.grp.myPanel.groupOne.myDropDownList_1; D.selection = 2; ad = y.grp.myPanel.groupTwo.myDropDownList_2; ad.selection = 2; R = y.grp.myPanel.myButton; D.selection = app.settings.haveSetting(k.scriptName, "compSizeToChange") ? app.settings.getSetting(k.scriptName, "compSizeToChange") : 2; ad.selection = app.settings.haveSetting(k.scriptName, "myFPS") ? app.settings.getSetting(k.scriptName, "myFPS") : 2; B.selection = app.settings.haveSetting(k.scriptName, "dd") ? app.settings.getSetting(k.scriptName, "dd") : 0; autoColor_Contrast.selection = app.settings.haveSetting( k.scriptName, "autoColor_Contrast" ) ? app.settings.getSetting(k.scriptName, "autoColor_Contrast") : 1; Y.selection = app.settings.haveSetting(k.scriptName, "tempoChange") ? app.settings.getSetting(k.scriptName, "tempoChange") : 1; scaleChange.selection = app.settings.haveSetting( k.scriptName, "scaleChange" ) ? app.settings.getSetting(k.scriptName, "scaleChange") : 0; r.text = app.settings.haveSetting(k.scriptName, "mainTitle01") ? app.settings.getSetting(k.scriptName, "mainTitle01") : "Title Here"; myRandom.value = app.settings.haveSetting(k.scriptName, "myRandom") ? !(app.settings.getSetting(k.scriptName, "myRandom") == "false") : false; myRepeat.value = app.settings.haveSetting(k.scriptName, "myRepeat") ? !(app.settings.getSetting(k.scriptName, "myRepeat") == "false") : false; Q.value = app.settings.haveSetting(k.scriptName, "limitShot") ? !(app.settings.getSetting(k.scriptName, "limitShot") == "false") : false; ag.text = app.settings.haveSetting(k.scriptName, "limitShotText") ? app.settings.getSetting(k.scriptName, "limitShotText") : "Max Seconds: " + secondsTo02 + "s"; K.value = app.settings.haveSetting(k.scriptName, "limitShotSlider") ? app.settings.getSetting(k.scriptName, "limitShotSlider") : 10; secondsTo01 = app.settings.haveSetting(k.scriptName, "secondsTo01") ? app.settings.getSetting(k.scriptName, "secondsTo01") : 10; min_limitShotText.text = app.settings.haveSetting( k.scriptName, "min_limitShotText" ) ? app.settings.getSetting(k.scriptName, "min_limitShotText") : "Min Seconds: " + min_secondsTo02 + "s"; min_limitShotSlider.value = app.settings.haveSetting( k.scriptName, "min_limitShotSlider" ) ? app.settings.getSetting(k.scriptName, "min_limitShotSlider") : 0.3; z = app.settings.haveSetting(k.scriptName, "defaultMinShot") ? app.settings.getSetting(k.scriptName, "defaultMinShot") : 0.3; if (Q.value == false) { ag.hide(); K.hide(); min_limitShotSlider.hide(); min_limitShotText.hide(); } else { ag.show(); K.show(); min_limitShotSlider.show(); min_limitShotText.show(); } y.layout.layout(true); y.grp.minimumSize = y.grp.size; y.layout.resize(); y.onResizing = y.onResize = function () { this.layout.resize(); }; return y; } function ak() { ar = new Window( "dialog", k.scriptName + " v" + k.scriptVersion, undefined, { resizeable: true } ); if (ar != null) { y = "group { \t\torientation: 'column', \t\talignment: ['fill','fill'], \t\talignChildren: ['fill','fill'], infoGrp: Group { alignment: ['fill','top'], alignChildren: ['fill','fill'], \t\t\t\t\ttxt: StaticText {properties:{multiline:true}, preferredSize:[150,50]}, hdr: StaticText {properties:{multiline:true}}, \t\t\t\t} \t\t\t\thelpGrp: Group { \t\t\t\t\ttxt: EditText { alignment: ['fill','fill'], properties:{multiline:true, readonly:true}}, \t\t\t\t} \t\t\t\tokGrp: Group { alignment: ['fill','bottom'], alignChildren: ['fill','fill'], tutBtn: Button {text:'Video Tutorial', preferredSize:[150,30], alignment: ['left','center']} \t\t\t\t\tokBtn: Button {text:'OK', preferredSize:[150,30], alignment: ['right','center']} \t\t\t\t} \t\t}"; ar.grp = ar.add(y); ar.grp.helpGrp.txt.preferredSize = [800, 500]; ar.grp.infoGrp.txt.text = k.strAbout1; ar.grp.infoGrp.hdr.text = k.strAboutReg; ar.grp.helpGrp.txt.text = k.strAbout2; ar.grp.okGrp.okBtn.onClick = function () { ar.close(); }; ar.grp.okGrp.tutBtn.onClick = function () { t(k.scriptUrl); }; ar.layout.layout(true); ar.layout.resize(); ar.onResizing = ar.onResize = function () { this.layout.resize(); }; ar.show(); } } function t(y) { av = "explorer "; ar = 'open "'; at = '"'; if ($.os.indexOf("Windows") != -1) { y = y.replace(RegExp("&", "g"), "^&"); au = 'cmd /c "' + av + y + '"'; system.callSystem(au); } else { au = ar + y + at; system.callSystem(au); } } function ap() { ar = 0; for (y = 1; y <= app.project.numItems; y = y + 1) { at = app.project.item(y).name; if (at == "###Comp 1") { s = app.project.item(y); ar++; } if (at == "###Comp Title") { i = app.project.item(y); ar++; } if (at == "###Music") { J = app.project.item(y); ar++; } if (at == "###Video") { q = app.project.item(y); ar++; } } if (ar == 4) { b(); am(); ar = 0; } } function b() { if (D.selection == 0) { P = 4096; O = 2112; } else { if (D.selection == 1) { P = 2048; O = 1556; } else { if (D.selection == 2) { P = 1920; O = 1080; } else { if (D.selection == 3) { P = 1280; O = 720; } else { if (D.selection == 4) { P = 720; O = 576; } else { if (D.selection == 5) { P = 720; O = 480; } } } } } } if (ad.selection == 0) { af = 23.976; } else { if (ad.selection == 1) { af = 24; } else { if (ad.selection == 2) { af = 25; } else { if (ad.selection == 3) { af = 29.97; } else { if (ad.selection == 4) { af = 30; } else { if (ad.selection == 5) { af = 50; } else { if (ad.selection == 6) { af = 59.94; } else { if (ad.selection == 7) { af = 60; } else { if (ad.selection == 8) { af = 120; } } } } } } } } } } function am() { y = app.project.numItems; if ( y != 0 && !(typeof s === "undefined") && !(typeof i === "undefined") && isValid(s) && isValid(i) && isValid(q) && isValid(J) ) { } else { if (!isValid(s) && !isValid(i) && !isValid(q) && !isValid(J)) { F(); } else { if (!isValid(s) || !isValid(i) || !isValid(q) || !isValid(J)) { if (!isValid(s)) { s = app.project.items.addComp("###Comp 1", P, O, 1, 800, af); s.displayStartTime = 0; ab(); } if (!isValid(i)) { i = app.project.items.addComp( "###Comp Title", 1920, 1080, 1, 7, af ); i.displayStartTime = 0; S(); } if (!isValid(q)) { q = app.project.items.addFolder("###Video"); } if (!isValid(J)) { J = app.project.items.addFolder("###Music"); } } } } } function o() { y = app.project.numItems; if ( y != 0 && !(typeof s === "undefined") && !(typeof i === "undefined") && isValid(s) && isValid(i) && isValid(q) && isValid(J) ) { al(); } else { if (!isValid(s) && !isValid(i) && !isValid(q) && !isValid(J)) { F(); } else { if (!isValid(s) || !isValid(i) || !isValid(q) || !isValid(J)) { if (!isValid(s)) { s = app.project.items.addComp("###Comp 1", P, O, 1, 800, af); s.displayStartTime = 0; ab(); } if (!isValid(i)) { i = app.project.items.addComp( "###Comp Title", 1920, 1080, 1, 7, af ); i.displayStartTime = 0; S(); } if (!isValid(q)) { q = app.project.items.addFolder("###Video"); } if (!isValid(J)) { J = app.project.items.addFolder("###Music"); } } } } } function ao() { for (y = 1; y <= app.project.numItems; y = y + 1) { ar = app.project.item(y).name; if (ar == "###Comp 1") { s = app.project.item(y); } if (ar == "###Comp Title") { i = app.project.item(y); } if (ar == "###Music") { J = app.project.item(y); } if (ar == "###Video") { q = app.project.item(y); } } } function S() { aq = i.layers.addSolid([1, 1, 1], "white solid mask", 1920, 1080, 1, c); aq.property("ADBE Transform Group") .property("ADBE Position") .setValue([651.9, 828.8]); aq.property("ADBE Transform Group") .property("ADBE Scale") .setValue([75.7, 46]); i.openInViewer(); aq.selected = true; aq.property("ADBE Mask Parade").addProperty("ADBE Mask Atom"); mySolidLayerX = aq; at = mySolidLayerX.mask(1); au = at.maskPath; myShapeX = au.value; myShapeX.closed = true; myShapeX.vertices = [ [369, 766], [-0.39, 767], [-0.66, 838], [542, 838], ]; au.setValue(myShapeX); y = aq.property("ADBE Transform Group").property("ADBE Position"); av = new Array(0, 1, 6, 7); ax = new Array( [-684.1, 828.8], [651.9, 828.8], [651.9, 828.8], [-684, 828.8] ); y.setValuesAtTimes(av, ax); Z = i.layers.addText("1"); Z.property("ADBE Transform Group") .property("ADBE Position") .setValue([169.5, 959.3]); ar = Z.property("ADBE Text Properties").property("ADBE Text Document"); ay = ar.value; ay.fontSize = 27; ay.tracking = 10; ay.fillColor = [0, 0, 0]; ay.applyStroke = true; ay.justification = ParagraphJustification.LEFT_JUSTIFY; ar.setValue(ay); aw = aq; Z.parent = aw; Z.property("ADBE Transform Group") .property("ADBE Position") .setValue([315.6, 823.7]); i.motionBlur = true; Z.motionBlur = true; aq.motionBlur = true; } function ab() { c = s.duration; ai = s.layers.addSolid([1, 1, 1], "Adjustment Layer 1", P, O, 1, c); ai.adjustmentLayer = true; ai.property("ADBE Transform Group") .property("ADBE Opacity") .setValue([0]); g = s.layers.addSolid([0, 0, 0], "Black Solid 1", P, O, 1, c); g.property("ADBE Transform Group").property("ADBE Opacity").setValue([0]); e = s.layers.addSolid([0, 0, 0], "Black Solid 1", P, O, 1, c); e.property("ADBE Transform Group").property("ADBE Opacity").setValue([0]); x = s.layers.addSolid( [0.133333, 0.545098, 0.133333], "Curve Preset Green", P, O, 1, c ); x.adjustmentLayer = true; x.property("ADBE Effect Parade").addProperty("ADBE Color Balance 2"); x.property("ADBE Effect Parade") .property("ADBE Color Balance 2") .property("ADBE Color Balance 2-0002") .setValue([19]); x.property("ADBE Effect Parade") .property("ADBE Color Balance 2") .property("ADBE Color Balance 2-0008") .setValue([35]); x.property("ADBE Transform Group").property("ADBE Opacity").setValue([0]); C = s.layers.addSolid( [0.698039, 0.133333, 0.133333], "Curve Preset Red", P, O, 1, c ); C.adjustmentLayer = true; C.property("ADBE Effect Parade").addProperty("ADBE Color Balance 2"); C.property("ADBE Effect Parade") .property("ADBE Color Balance 2") .property("ADBE Color Balance 2-0001") .setValue([19]); C.property("ADBE Effect Parade") .property("ADBE Color Balance 2") .property("ADBE Color Balance 2-0007") .setValue([35]); C.property("ADBE Transform Group").property("ADBE Opacity").setValue([0]); N = s.layers.addSolid([0, 0, 1], "Curve Preset Blue", P, O, 1, c); N.adjustmentLayer = true; N.property("ADBE Effect Parade").addProperty("ADBE Color Balance 2"); N.property("ADBE Effect Parade") .property("ADBE Color Balance 2") .property("ADBE Color Balance 2-0003") .setValue([19]); N.property("ADBE Effect Parade") .property("ADBE Color Balance 2") .property("ADBE Color Balance 2-0009") .setValue([35]); N.property("ADBE Transform Group").property("ADBE Opacity").setValue([0]); ac = s.layers.addSolid([0, 0, 0], "Solid", P, O, 1, c); ac.property("ADBE Transform Group") .property("ADBE Opacity") .setValue([0]); } function F() { app.beginUndoGroup(k.scriptName + " - Create Composition and Folders"); s = app.project.items.addComp("###Comp 1", P, O, 1, 800, af); s.displayStartTime = 0; i = app.project.items.addComp("###Comp Title", 1920, 1080, 1, 7, af); i.displayStartTime = 0; c = s.duration; ab(); S(); q = app.project.items.addFolder("###Video"); J = app.project.items.addFolder("###Music"); app.endUndoGroup(); } function V() { app.beginUndoGroup(k.scriptName + " - Create Compositions"); s = app.project.items.addComp("###Comp 1", P, O, 1, 800, af); s.displayStartTime = 0; i = app.project.items.addComp("###Comp Title", 1920, 1080, 1, 7, af); i.displayStartTime = 0; ab(); S(); app.endUndoGroup(); app.endUndoGroup(); } function al() { app.beginUndoGroup( k.scriptName + " - Change composition resolution and fps" ); y = new Window("palette", "Progress Bar", undefined); y.orientation = "column"; at = y.add("group", undefined, "groupFinal"); at.orientation = "column"; at.alignChildren = "fill"; ay = at.add("statictext", undefined, "Processing, please wait"); ar = at.add("progressbar", undefined, "My Progress Bar"); ar.value = 0; ar.maxvalue = 100; av = ar.maxvalue / 1; y.center(); y.show(); y.update(); s.width = P; s.height = O; s.frameRate = af; i.frameRate = af; au = s.layers.length; aw = av / au; for (az = 1; az <= au; az = az + 1) { compObj = s; layerObj = s.layer(az); if (layerObj.hasAudio == true && layerObj.hasVideo == false) { continue; } if ( layerObj.property("ADBE Transform Group").property("ADBE Scale") .isTimeVarying == true ) { continue; } if (scaleChange.selection == 0 || scaleChange.selection == 1) { function ax(aG, aF) { aF.property("ADBE Transform Group") .property("ADBE Scale") .setValue([100, 100]); aA = aF.sourceRectAtTime(0, false); curLayerScaleObj = aF .property("ADBE Transform Group") .property("ADBE Scale"); curLayerScaleVal = curLayerScaleObj.value; if (scaleChange.selection == 0) { aE = curLayerScaleVal * Math.min(aG.width / aA.width, aG.height / aA.height); } else { aE = curLayerScaleVal * Math.min(aG.width / aA.width); } curLayerScaleObj.setValue(aE); s.openInViewer(); aC = s.layers.length; for (aB = 1; aB <= aC; aB = aB + 1) { s.layer(aB).selected = false; } app.project.activeItem.layer(az).selected = true; if (P == 4096 && O == 2112) { app.project.activeItem .layer(az) .property("ADBE Transform Group") .property("ADBE Position") .setValue([2048, 1056]); } else { if (P == 2048 && O == 1556) { app.project.activeItem .layer(az) .property("ADBE Transform Group") .property("ADBE Position") .setValue([1024, 778]); } else { if (P == 1920 && O == 1080) { app.project.activeItem .layer(az) .property("ADBE Transform Group") .property("ADBE Position") .setValue([960, 540]); } else { if (P == 1280 && O == 720) { app.project.activeItem .layer(az) .property("ADBE Transform Group") .property("ADBE Position") .setValue([640, 360]); } else { if (P == 720 && O == 576) { app.project.activeItem .layer(az) .property("ADBE Transform Group") .property("ADBE Position") .setValue([360, 288]); } else { if (P == 720 && O == 480) { app.project.activeItem .layer(az) .property("ADBE Transform Group") .property("ADBE Position") .setValue([360, 240]); } } } } } } ar.value = ar.value + aw; y.show(); y.update(); } ax(compObj, layerObj); } } y.close(); app.endUndoGroup(); } function aj(ay) { at = ay.toString(); aw = Z.property("ADBE Text Properties") .property("ADBE Text Document") .setValue(at); ax = Z.property("ADBE Text Properties") .property("ADBE Text Document") .value.toString(); y = ax.length; mySolidLayer = aq; ar = mySolidLayer.mask(1); au = ar.maskPath; myShape = au.value; myShape.closed = true; if (y == 0) { myShape.vertices = [ [369, 766], [-0.39, 767], [-0.66, 838], [542, 838], ]; } else { if (y > 0) { av = y * 22; myShape.vertices = [ [av + 369, 766], [-0.39, 767], [-0.66, 838], [av + 369 + 173, 838], ]; } } au.setValue(myShape); } function j(au) { app.beginUndoGroup(k.scriptName + " - Main Process - Video Editing"); aH = new Window("palette", "Progress Bar", undefined); aH.orientation = "column"; ax = aH.add("group", undefined, "groupFinal"); ax.orientation = "column"; ax.alignChildren = "fill"; aF = ax.add("statictext", undefined, "Processing Editing"); ar = ax.add("progressbar", [0, 0, 400, 20], "My Progress Bar"); ar.value = 0; ar.maxvalue = 100; a9 = ar.maxvalue / 9; aH.center(); aH.show(); aH.update(); try { function aD() { bL = s.layers.length; bb = s.layer(bL).inPoint; s.layer(bL).outPoint = s.workAreaDuration; bM = s.layer(bL).outPoint; bQ = bM - bb; if (bQ < z) { az = "The Beat Edit Process [Serial A11] was not able to be completed."; s.layer(bL - 1).outPoint = s.layer(bL).outPoint; s.layer(bL).remove(); bR = s.layers.length; bO = s.layer(bR); if (bO.outPoint < s.workAreaDuration) { s.openInViewer(); bO.selected = true; bO.timeRemapEnabled = true; if (bO.timeRemapEnabled == true) { bK = s.workAreaDuration; bP = bO.property("ADBE Time Remapping").maxValue; bO.property("ADBE Time Remapping").setValueAtTime(bK, bP); bO.property("ADBE Time Remapping").removeKey(2); bS = s.workAreaStart; bN = s.workAreaDuration; bO.property("ADBE Transform Group") .property("ADBE Opacity") .setValueAtTime(bK, 0); bO.property("ADBE Transform Group") .property("ADBE Opacity") .setValueAtTime(bK - 1, 100); } } else { bK = s.workAreaDuration; bO.outPoint = s.workAreaDuration; bO.property("ADBE Transform Group") .property("ADBE Opacity") .setValueAtTime(bK, 0); bO.property("ADBE Transform Group") .property("ADBE Opacity") .setValueAtTime(bK - 1, 100); } } } az = ""; if (Q.value == false) { z = 0; } be = app.project.numItems; a8 = a9 / be; az = "The Bring Music process was not able to be completed."; for (a0 = 1; a0 <= be; a0 = a0 + 1) { curItem = app.project.item(a0); if (curItem.parentFolder.name == J.name && curItem.hasAudio == true) { d = s.layers.add(curItem); d.moveToEnd(); s.workAreaDuration = d.outPoint; } aF.text = "Bring Music"; ar.value = ar.value + a8; aH.update(); } az = "The Convert Audio to Keyframes process was not able to be completed."; s.openInViewer(); bJ = s.layers.length; for (aZ = 1; aZ <= bJ; aZ = aZ + 1) { s.layer(aZ).selected = false; } app.project.activeItem.layer(8).selected = true; app.executeCommand(T); f = s.layer(1); az = "The Hide Audio Amplitude process was not able to be completed."; s.openInViewer(); bJ = s.layers.length; for (aZ = 1; aZ <= bJ; aZ = aZ + 1) { s.layer(aZ).selected = false; } f.selected = true; f.enabled = false; az = "The Stereo Side Keys process was not able to be completed."; aw = s .layer(1) .property("ADBE Effect Parade") .property("ADBE Slider Control") .property("ADBE Slider Control-0001").numKeys; aQ = s .layer(1) .property("ADBE Effect Parade") .property("ADBE Slider Control") .property("ADBE Slider Control-0001").numKeys; bg = s .layer(1) .property("ADBE Effect Parade") .property("ADBE Slider Control") .property("ADBE Slider Control-0001").numKeys; aN = s .layer(1) .property("ADBE Effect Parade") .property("ADBE Slider Control") .property("ADBE Slider Control-0001"); bs = s .layer(1) .property("ADBE Effect Parade") .property("ADBE Slider Control") .property("ADBE Slider Control-0001"); bw = s .layer(1) .property("ADBE Effect Parade") .property("ADBE Slider Control") .property("ADBE Slider Control-0001"); aL = s.workAreaStart; az = "The Deselect process was not able to be completed."; layesDeselectAll = s.layers.length; a7 = a9 / layesDeselectAll; for (aC = 1; aC <= layesDeselectAll; aC = aC + 1) { bG = s.layer(aC); if (bG.selected == true) { bG.selected = false; } ar.value = ar.value + a7; } a6 = a9 / app.project.numItems; aO = new Array(); az = "The Video Array process was not able to be completed."; for (aZ = 1; aZ <= app.project.numItems; aZ = aZ + 1) { ar.value = ar.value + a8; aH.show(); aH.update(); if (app.project.item(aZ).parentFolder.name == q.name) { aO[aO.length] = app.project.item(aZ); } aF.text = "Video Array"; ar.value = ar.value + a6; aH.update(); } a4 = a9 / app.project.numItems; az = "The First Video process was not able to be completed."; for (aR = 1; aR <= app.project.numItems; aR = aR + 1) { if (app.project.item(aR).name == aO[0].name) { bk = app.project.item(aR); s.layers.add(bk); s.layer(1).moveToEnd(); aT = s.layers.length; s.layer(aT).startTime = s.workAreaStart; s.layer(aT).audioEnabled = false; break; } aF.text = "First Video"; ar.value = ar.value + a4; aH.update(); } H = secondsTo01 * af; if (Q.value == false) { H = 60 * af; } a3 = a9 / aw; aF.text = "Beat Edit"; aH.update(); az = "The Beat Edit process was not able to be completed."; bf = 0; bD = 0; bc = false; for (aS = 2; aS <= aw; aS = aS + 1) { if (aS > 1) { aX = s .layer(1) .property("ADBE Effect Parade") .property("ADBE Slider Control") .property("ADBE Slider Control-0001") .keyTime(aS - 1); bu = s .layer(1) .property("ADBE Effect Parade") .property("ADBE Slider Control") .property("ADBE Slider Control-0001") .keyValue(aS - 1); } else { aX = s .layer(1) .property("ADBE Effect Parade") .property("ADBE Slider Control") .property("ADBE Slider Control-0001") .keyTime(aS); bu = s .layer(1) .property("ADBE Effect Parade") .property("ADBE Slider Control") .property("ADBE Slider Control-0001") .keyValue(aS); } bC = s .layer(1) .property("ADBE Effect Parade") .property("ADBE Slider Control") .property("ADBE Slider Control-0001") .keyTime(aS); aK = s .layer(1) .property("ADBE Effect Parade") .property("ADBE Slider Control") .property("ADBE Slider Control-0001") .keyValue(aS); bf++; if (aK > au + bu || bf == H) { for (aZ = 1; aZ <= app.project.numItems; aZ = aZ + 1) { az = "The Beat Frame process was not able to be completed."; if (app.project.item(aZ).name == aO[0].name) { bj = app.project.item(aZ); s.layers.add(bj); s.layer(1).moveToEnd(); bF = s.layers.length; s.layer(bF).startTime = bC; s.layer(bF).audioEnabled = false; bD++; if (myRepeat.value == false && bD > aO.length) { bc = true; } bf = 0; break; } } } if (bc == true) { break; } ar.value = ar.value + a3; } bA = 0; bv = false; bz = s.layers.length - 9; a2 = a9 / bz; az = "The Video Editing process was not able to be completed."; for (a5 = 1; a5 < bz; a5 = a5 + 1) { aF.text = "Video Editing"; ar.value = ar.value + a2; aH.update(); if (aO[a5 - 1] != null) { if (myRandom.value == true) { az = "The Beat Edit Process [Serial A1] was not able to be completed."; aB = aO.length; bp = Math.floor(Math.random() * aB); s.layer(9 + a5).replaceSource(aO[bp], false); } else { az = "The Beat Edit Process [Serial A2] was not able to be completed."; s.layer(9 + a5).replaceSource(aO[a5 - 1], false); } compObj = s; layerObj = s.layer(9 + a5); if (scaleChange.selection == 0 || scaleChange.selection == 1) { function bI(bN, bM) { bM.property("ADBE Transform Group") .property("ADBE Scale") .setValue([100, 100]); bb = bM.sourceRectAtTime(0, false); curLayerScaleObj = bM .property("ADBE Transform Group") .property("ADBE Scale"); curLayerScaleVal = curLayerScaleObj.value; if (scaleChange.selection == 0) { bL = curLayerScaleVal * Math.min(bN.width / bb.width, bN.height / bb.height); } else { bL = curLayerScaleVal * Math.min(bN.width / bb.width); } curLayerScaleObj.setValue(bL); } bI(compObj, layerObj); } if (autoColor_Contrast.selection == 1) { s.layer(9 + a5) .property("ADBE Effect Parade") .addProperty("ADBE AutoColor"); s.layer(9 + a5) .property("ADBE Effect Parade") .addProperty("ADBE AutoContrast"); } s.layer(9 + a5).outPoint = s.layer(10 + a5).inPoint; aI = s.layer(9 + a5).inPoint; ba = s.layer(9 + a5).outPoint; bl = ba - aI; if (bl < z) { az = "The Beat Edit Process [Serial A3] was not able to be completed."; s.layer(10 + a5).startTime = s.layer(9 + a5).inPoint; s.layer(9 + a5) .property("ADBE Transform Group") .property("ADBE Opacity") .setValue([0]); } bq = s.layers.length; aJ = s.layer(bq); if (s.layer(10 + a5) == aJ) { az = "The Beat Edit Process [Serial A4] was not able to be completed."; s.layer(10 + a5).outPoint = s.workAreaDuration; aG = s.workAreaStart; bH = s.workAreaDuration; s.layer(10 + a5) .property("ADBE Transform Group") .property("ADBE Opacity") .setValueAtTime(bH, 0); s.layer(10 + a5) .property("ADBE Transform Group") .property("ADBE Opacity") .setValueAtTime(bH - 1, 100); E = 10 + a5; d.property("ADBE Audio Group") .property("ADBE Audio Levels") .setValueAtTime(bH, [-25, -25]); d.property("ADBE Audio Group") .property("ADBE Audio Levels") .setValueAtTime(bH - 5, [-4, -4]); d.property("ADBE Audio Group") .property("ADBE Audio Levels") .setValueAtTime(aG, [-4, -4]); bv = true; break; } } else { if ( aO[a5 - 1] == null && myRepeat.value == true && myRandom.value == true && s.workAreaDuration > s.layer(9 + a5).inPoint ) { az = "The Beat Edit Process [Serial A5] was not able to be completed."; aB = aO.length; bp = Math.floor(Math.random() * aB); s.layer(9 + a5).replaceSource(aO[bp], false); compObj = s; layerObj = s.layer(9 + a5); if (scaleChange.selection == 0 || scaleChange.selection == 1) { function bI(bN, bM) { bM.property("ADBE Transform Group") .property("ADBE Scale") .setValue([100, 100]); bb = bM.sourceRectAtTime(0, false); curLayerScaleObj = bM .property("ADBE Transform Group") .property("ADBE Scale"); curLayerScaleVal = curLayerScaleObj.value; if (scaleChange.selection == 0) { bL = curLayerScaleVal * Math.min(bN.width / bb.width, bN.height / bb.height); } else { bL = curLayerScaleVal * Math.min(bN.width / bb.width); } curLayerScaleObj.setValue(bL); } bI(compObj, layerObj); } if (autoColor_Contrast.selection == 1) { s.layer(9 + a5) .property("ADBE Effect Parade") .addProperty("ADBE AutoColor"); s.layer(9 + a5) .property("ADBE Effect Parade") .addProperty("ADBE AutoContrast"); } s.layer(9 + a5).outPoint = s.layer(10 + a5).inPoint; aI = s.layer(9 + a5).inPoint; ba = s.layer(9 + a5).outPoint; bl = ba - aI; if (bl < z) { az = "The Beat Edit Process [Serial A6] was not able to be completed."; s.layer(10 + a5).startTime = s.layer(9 + a5).inPoint; s.layer(9 + a5) .property("ADBE Transform Group") .property("ADBE Opacity") .setValue([0]); } bv = true; } else { if ( aO[a5 - 1] == null && myRepeat.value == true && myRandom.value == false && s.workAreaDuration > s.layer(9 + a5).inPoint ) { az = "The Beat Edit Process [Serial A7] was not able to be completed."; if (bA > aO.length - 1) { bA = 0; } s.layer(9 + a5).replaceSource(aO[bA], false); bA++; compObj = s; layerObj = s.layer(9 + a5); if (scaleChange.selection == 0 || scaleChange.selection == 1) { function bI(bN, bM) { bM.property("ADBE Transform Group") .property("ADBE Scale") .setValue([100, 100]); bb = bM.sourceRectAtTime(0, false); curLayerScaleObj = bM .property("ADBE Transform Group") .property("ADBE Scale"); curLayerScaleVal = curLayerScaleObj.value; if (scaleChange.selection == 0) { bL = curLayerScaleVal * Math.min(bN.width / bb.width, bN.height / bb.height); } else { bL = curLayerScaleVal * Math.min(bN.width / bb.width); } curLayerScaleObj.setValue(bL); } bI(compObj, layerObj); } if (autoColor_Contrast.selection == 1) { s.layer(9 + a5) .property("ADBE Effect Parade") .addProperty("ADBE AutoColor"); s.layer(9 + a5) .property("ADBE Effect Parade") .addProperty("ADBE AutoContrast"); } s.layer(9 + a5).outPoint = s.layer(10 + a5).inPoint; aI = s.layer(9 + a5).inPoint; ba = s.layer(9 + a5).outPoint; bl = ba - aI; if (bl < z) { az = "The Beat Edit Process [Serial A8] was not able to be completed."; s.layer(10 + a5).startTime = s.layer(9 + a5).inPoint; s.layer(9 + a5) .property("ADBE Transform Group") .property("ADBE Opacity") .setValue([0]); } bv = true; } else { if ( aO[a5 - 1] == null && myRepeat.value == true && s.workAreaDuration < s.layer(9 + a5).inPoint ) { az = "The Beat Edit Process [Serial A9] was not able to be completed."; s.workAreaDuration = s.layer(9 + a5).outPoint; aG = s.workAreaStart; bH = s.workAreaDuration; s.layer(9 + a5) .property("ADBE Transform Group") .property("ADBE Opacity") .setValueAtTime(bH, 0); s.layer(9 + a5) .property("ADBE Transform Group") .property("ADBE Opacity") .setValueAtTime(bH - 1, 100); E = 9 + a5; d.property("ADBE Audio Group") .property("ADBE Audio Levels") .setValueAtTime(bH, [-25, -25]); d.property("ADBE Audio Group") .property("ADBE Audio Levels") .setValueAtTime(bH - 5, [-4, -4]); d.property("ADBE Audio Group") .property("ADBE Audio Levels") .setValueAtTime(aG, [-4, -4]); break; } else { if ( aO[a5 - 1] == null && s.workAreaDuration > s.layer(9 + a5).outPoint ) { az = "The Beat Edit Process [Serial A10] was not able to be completed."; s.workAreaDuration = s.layer(9 + a5 - 1).outPoint; aG = s.workAreaStart; bH = s.workAreaDuration; s.layer(9 + a5 - 1) .property("ADBE Transform Group") .property("ADBE Opacity") .setValueAtTime(bH, 0); s.layer(9 + a5 - 1) .property("ADBE Transform Group") .property("ADBE Opacity") .setValueAtTime(bH - 1, 100); E = 9 + a5 - 1; d.property("ADBE Audio Group") .property("ADBE Audio Levels") .setValueAtTime(bH, [-25, -25]); d.property("ADBE Audio Group") .property("ADBE Audio Levels") .setValueAtTime(bH - 5, [-4, -4]); d.property("ADBE Audio Group") .property("ADBE Audio Levels") .setValueAtTime(aG, [-4, -4]); break; } } } } } } az = "The Color Preset process was not able to be completed."; if (B.selection == 0) { C.property("ADBE Transform Group") .property("ADBE Opacity") .setValue([0]); x.property("ADBE Transform Group") .property("ADBE Opacity") .setValue([0]); N.property("ADBE Transform Group") .property("ADBE Opacity") .setValue([0]); } if (B.selection == 1) { C.property("ADBE Transform Group") .property("ADBE Opacity") .setValue([100]); x.property("ADBE Transform Group") .property("ADBE Opacity") .setValue([0]); N.property("ADBE Transform Group") .property("ADBE Opacity") .setValue([0]); } if (B.selection == 2) { x.property("ADBE Transform Group") .property("ADBE Opacity") .setValue([100]); C.property("ADBE Transform Group") .property("ADBE Opacity") .setValue([0]); N.property("ADBE Transform Group") .property("ADBE Opacity") .setValue([0]); } if (B.selection == 3) { N.property("ADBE Transform Group") .property("ADBE Opacity") .setValue([100]); C.property("ADBE Transform Group") .property("ADBE Opacity") .setValue([0]); x.property("ADBE Transform Group") .property("ADBE Opacity") .setValue([0]); } bE = s.layers.length; aG = s.workAreaStart; bH = s.workAreaDuration; s.layer(bE) .property("ADBE Transform Group") .property("ADBE Opacity") .setValueAtTime(bH, 0); s.layer(bE) .property("ADBE Transform Group") .property("ADBE Opacity") .setValueAtTime(bH - 1, 100); if (autoColor_Contrast.selection == 1) { s.layer(bE) .property("ADBE Effect Parade") .addProperty("ADBE AutoColor"); s.layer(bE) .property("ADBE Effect Parade") .addProperty("ADBE AutoContrast"); } compObj = s; layerObj = s.layer(bE); if (scaleChange.selection == 0 || scaleChange.selection == 1) { function bI(bN, bM) { bM.property("ADBE Transform Group") .property("ADBE Scale") .setValue([100, 100]); bb = bM.sourceRectAtTime(0, false); curLayerScaleObj = bM .property("ADBE Transform Group") .property("ADBE Scale"); curLayerScaleVal = curLayerScaleObj.value; if (scaleChange.selection == 0) { bL = curLayerScaleVal * Math.min(bN.width / bb.width, bN.height / bb.height); } else { bL = curLayerScaleVal * Math.min(bN.width / bb.width); } curLayerScaleObj.setValue(bL); } bI(compObj, layerObj); } az = "The Audio Property process was not able to be completed."; d.property("ADBE Audio Group") .property("ADBE Audio Levels") .setValueAtTime(bH, [-25, -25]); d.property("ADBE Audio Group") .property("ADBE Audio Levels") .setValueAtTime(bH - 5, [-4, -4]); d.property("ADBE Audio Group") .property("ADBE Audio Levels") .setValueAtTime(aG, [-4, -4]); s.frameBlending = true; aM = s.layers.length; a1 = a9 / aM; az = "The Time Remapping process was not able to be completed."; for (bn = 1; bn <= aM; bn = bn + 1) { aF.text = "Time Check"; ar.value = ar.value + a1; aH.show(); aH.update(); if (10 + bn <= aM) { av = s.layer(9 + bn); bo = s .layer(9 + bn) .property("ADBE Transform Group") .property("ADBE Opacity").value; br = s.layer(10 + bn); bB = s.workAreaDuration; if ( av.outPoint + 0.1 < br.inPoint && bo == 100 && av.inPoint <= bB ) { s.openInViewer(); app.project.activeItem.layer(9 + bn).selected = true; app.project.activeItem.layer(9 + bn).timeRemapEnabled = true; s.layer(9 + bn).outPoint = s.layer(10 + bn).inPoint; by = s.layer(10 + bn).inPoint; bt = s.layer(9 + bn).property("ADBE Time Remapping").maxValue; app.project.activeItem .layer(9 + bn) .property("ADBE Time Remapping") .setValueAtTime(by, bt); s.layer(9 + bn) .property("ADBE Time Remapping") .removeKey(2); s.openInViewer(); app.project.activeItem.layer(9 + bn).selected = true; app.project.activeItem.layer(9 + bn).frameBlendingType = FrameBlendingType.FRAME_MIX; n = app.project.activeItem.layer(9 + bn); layesDeselectAll = s.layers.length; for (aC = 1; aC <= layesDeselectAll; aC = aC + 1) { bG = s.layer(aC); if (bG.selected == true) { bG.selected = false; } } } } } bd = s.numLayers; aA = s.layer(bd); at = s.numLayers; az = "The Delete Unused Layers process was not able to be completed."; if (bv == false && at > 0) { for (aW = at; aW > E; aW--) {} } else { if (bv == true && aA.outPoint < s.workAreaDuration) { s.openInViewer(); aA.selected = true; aA.timeRemapEnabled = true; if (aA.timeRemapEnabled == true) { by = s.workAreaDuration; bt = aA.property("ADBE Time Remapping").maxValue; aA.property("ADBE Time Remapping").setValueAtTime(by, bt); aA.property("ADBE Time Remapping").removeKey(2); bi = s.workAreaStart; y = s.workAreaDuration; aA.property("ADBE Transform Group") .property("ADBE Opacity") .setValueAtTime(bH, 0); aA.property("ADBE Transform Group") .property("ADBE Opacity") .setValueAtTime(bH - 1, 100); aA.outPoint = s.workAreaDuration; } } } az = "The Minimum Shot Duration process was not able to be completed."; aV = s.numLayers; aY = a9 / aV; for (aP = aV; aP > 1; aP--) { bh = s.layer(aP); if (bh.hasVideo == true) { bm = bh.property("ADBE Transform Group").property("ADBE Opacity"); if (bm.value == 0) { bh.remove(); } } aF.text = "Minimum Shot Duration"; ar.value = ar.value + aY; aH.update(); } aD(); az = "The Last Layer Length process was not able to be completed."; bd = s.numLayers; s.layer(bd).outPoint = s.workAreaDuration; az = "The Add Text Composition process was not able to be completed."; aE = i; I = s.layers.add(aE); m = s.layers.add(aE); s.layer(1).startTime = bH - 7; aU = a9 / 3; az = "The Scale Title process was not able to be completed."; for (ay = 1; ay < 3; ay = ay + 1) { function bI(bN, bM) { bb = bM.sourceRectAtTime(0, false); curLayerScaleObj = bM .property("ADBE Transform Group") .property("ADBE Scale"); curLayerScaleVal = curLayerScaleObj.value; bL = curLayerScaleVal * Math.min(bN.width / bb.width, bN.height / bb.height); curLayerScaleObj.setValue(bL); } compObj = s; layerObj = s.layer(ay); bI(compObj, layerObj); aF.text = "Scale Title"; ar.value = ar.value + aU; aH.update(); } ah++; aH.close(); alert("Process Completed Successfully"); } catch (bx) { alert( az + "\nMake sure you don't press on the mouse or keyboard while the automated process is running, wait for the message 'Process Completed Successfully'." ); } app.endUndoGroup(); } v = w(u); if (v != null && v instanceof Window) { v.center(); v.show(); } helpME.onClick = function () { ak(); }; ap(); D.onChange = function () { app.settings.saveSetting( k.scriptName, "compSizeToChange", this.selection.index ); }; ad.onChange = function () { app.settings.saveSetting(k.scriptName, "myFPS", this.selection.index); }; B.onChange = function () { app.settings.saveSetting(k.scriptName, "dd", this.selection.index); }; autoColor_Contrast.onChange = function () { app.settings.saveSetting( k.scriptName, "autoColor_Contrast", this.selection.index ); }; Y.onChange = function () { app.settings.saveSetting( k.scriptName, "tempoChange", this.selection.index ); }; scaleChange.onChange = function () { app.settings.saveSetting( k.scriptName, "scaleChange", this.selection.index ); }; r.onChange = function () { app.settings.saveSetting(k.scriptName, "mainTitle01", this.text); }; myRandom.onClick = function () { app.settings.saveSetting(k.scriptName, "myRandom", this.value); }; myRepeat.onClick = function () { app.settings.saveSetting(k.scriptName, "myRepeat", this.value); }; Q.onClick = function () { if (Q.value == false) { ag.hide(); K.hide(); min_limitShotSlider.hide(); min_limitShotText.hide(); } else { ag.show(); K.show(); min_limitShotSlider.show(); min_limitShotText.show(); } app.settings.saveSetting(k.scriptName, "limitShot", this.value); }; K.onChanging = function () { secondsTo01 = Math.round(K.value); secondsTo02 = secondsTo01.toString(); ag.text = "Max Seconds: " + secondsTo02 + "s"; app.settings.saveSetting(k.scriptName, "secondsTo01", secondsTo01); app.settings.saveSetting(k.scriptName, "limitShotSlider", secondsTo02); app.settings.saveSetting(k.scriptName, "limitShotText", ag.text); }; min_limitShotSlider.onChanging = function () { min_secondsTo01 = min_limitShotSlider.value.toFixed(2); min_secondsTo02 = min_secondsTo01.toString(); min_limitShotText.text = "Min Seconds: " + min_secondsTo02 + "s"; z = parseFloat(min_secondsTo02); app.settings.saveSetting( k.scriptName, "min_limitShotSlider", min_secondsTo02 ); app.settings.saveSetting( k.scriptName, "min_limitShotText", min_limitShotText.text ); app.settings.saveSetting(k.scriptName, "defaultMinShot", z); }; R.onClick = function () { b(); ao(); o(); }; U.onClick = function () { y = ""; ap(); if (isValid(s) && isValid(i) && isValid(q) && isValid(J)) { y = "The Assets Confirm process was not able to be completed."; au = 0; at = 0; ar = J.numItems; av = k.isTrial ? Math.min(q.numItems, 10) : q.numItems; if (k.isTrial && av > 9) { alert( "The trial mode is limited to 10 videos. Only the first 10 videos will be used (put up to 10 videos in the ###Video folder and press the 'Do It' button).\nThe full version does not have any limitations" ); } ay = app.project.numItems; for (ax = 1; ax <= ay; ax = ax + 1) { curItemMM = app.project.item(ax); if ( curItemMM.parentFolder.name == J.name && curItemMM.hasAudio == true && curItemMM.hasVideo == false ) { au++; } if ( curItemMM.parentFolder.name == q.name && curItemMM.hasVideo == true && curItemMM.frameRate != 0 ) { at++; } } if ( q.numItems <= 3 || J.numItems == 0 || J.numItems > 1 || au != ar || at != av ) { alert( "Please make sure you have 1 Music file (not more than 1) inside '###Music' folder and that you have more than 3 video files inside '###Video' folder before pressing the 'Do it' button" ); } else { y = "The Create New Assets process was not able to be completed."; s.remove(); i.remove(); V(); y = "The Create New Title process was not able to be completed."; aa = r.text; aj(aa); y = "The Music Tempo process was not able to be completed."; if (Y.selection == 0) { aw = 6; } if (Y.selection == 1) { aw = 12; } if (Y.selection == 2) { aw = 16; } if (Y.selection == 3) { aw = 22; } if (Y.selection == 4) { aw = 25; } j(aw); } } else { if (!isValid(s) || !isValid(i) || !isValid(q) || !isValid(J)) { y = "The Check Items Process was not able to be completed, Assets are missing."; b(); if (!isValid(s)) { y = "The Check Items Process was not able to be completed, Assets are missing."; s = app.project.items.addComp("###Comp 1", P, O, 1, 800, af); s.displayStartTime = 0; ab(); } if (!isValid(i)) { y = "The Check Items Process was not able to be completed, Assets are missing."; i = app.project.items.addComp( "###Comp Title", 1920, 1080, 1, 7, af ); i.displayStartTime = 0; S(); } if (!isValid(q)) { y = "The Check Items Process was not able to be completed, Assets are missing."; q = app.project.items.addFolder("###Video"); } if (!isValid(J)) { y = "The Check Items Process was not able to be completed, Assets are missing."; J = app.project.items.addFolder("###Music"); } alert( y + "\nTry Again and make sure you have only 1 music file inside the music folder and more than 3 video files inside the video folder.\nIn case you deleted one of the comps or folders necessary for the operation, now it is restored." ); } } }; } else { alert( "This script will only run if you use After Effects CS6 version and above" ); } } gg_AutomatedVideoEditing(this);