Answered
extendscript how to execute code that is in edittext
i have a button ready onclick event now how do i execute so it runs codes of the edit textbox.
var testcodee = winObj.add("button", [759, 570, 759+98, 570+23], "Test Execute code");testcodee.onClick = function(){
need to execute code here to edit textbox
}
This is the code in
function setFx(lyr)
{
var eg = lyr.property("ADBE Effect Parade");
//---------
var fx = eg.addProperty("ADBE AutoContrast");
fx.name = "Auto Contrast"
fx.enabled = true;
fx.property("ADBE AutoContrast-0001").setValue(0);//Temporal Smoothing (seconds)
fx.property("ADBE AutoContrast-0002").setValue(0);//Scene Detect
fx.property("ADBE AutoContrast-0003").setValue(0.10000000149012);//Black Clip
fx.property("ADBE AutoContrast-0004").setValue(0.10000000149012);//White Clip
fx.property("ADBE AutoContrast-0005").setValue(0);//Blend With Original
}
if ( app.project.activeItem instanceof CompItem) {
var sl = app.project.activeItem.selectedLayers;
if ( sl.length>0){
setFx(sl[0]);
}
}
