-
My script makes AE crash when using script UI
This is my script:
p = app.project.activeItem;var w = new Window ("palette");
w.alignChildren = "fill";
// Paramétrage symétrique
var p4 = w.add ("panel");
p4.alignChildren = "fill";
p4.add ("statictext", undefined, "Etape 4");
var btn6 = p4.add ("button", undefined, "Paramétrer symétriquement", {name:"OK"});
btn6.onClick = function(){keyCloner();}w.show ( );
function keyCloner(){
selLayers = p.selectedLayers;
for(w in selLayers){
selProps = selLayers[w].selectedProperties;
for(x in selProps){
if(selProps[x].propertyDepth == 3){
if(selProps[x].keyValue(2) == selProps[x].keyValue(3)){
alert(selProps[x].matchName);
}
else{
alert(selProps[x].matchName);
}
exit;
}
}
}
}When using it like this, it crashes.
When removing the script UI, and calling the function with
keyCloner();
it works.I think the problem is with
function(){keyCloner();}
but I don’t understand why. Does someone have an idea ?
Sorry, there were no replies found.