Skip to main content
Inspiring
June 14, 2022
Answered

extendscript how to execute code that is in edittext

  • June 14, 2022
  • 2 replies
  • 352 views

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]);
	}
}

 

This topic has been closed for replies.
Correct answer Mathias Moehl

If you entered some javascript code in an EditText object with name tbProp, then you can execute  this code with
eval(tbProp.text)

 

2 replies

Mathias Moehl
Community Expert
Mathias MoehlCommunity ExpertCorrect answer
Community Expert
June 14, 2022

If you entered some javascript code in an EditText object with name tbProp, then you can execute  this code with
eval(tbProp.text)

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Inspiring
June 15, 2022

thanks bro . will test it out

Inspiring
June 14, 2022

oh my edittextbox is

var tbProp = gb1.add("edittext", [15, 18, 15+848, 18+510], codeList,{multiline: true,readonly:false } );