extendscript how to execute code that is in edittext

Explorer ,
Jun 14, 2022 Jun 14, 2022

Copy link to clipboard

Copied

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

 

TOPICS
Expressions , Scripting

Views

53

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Jun 14, 2022 Jun 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)

 

Likes

Translate

Translate
Explorer ,
Jun 14, 2022 Jun 14, 2022

Copy link to clipboard

Copied

oh my edittextbox is

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 14, 2022 Jun 14, 2022

Copy link to clipboard

Copied

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

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 14, 2022 Jun 14, 2022

Copy link to clipboard

Copied

thanks bro . will test it out

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 14, 2022 Jun 14, 2022

Copy link to clipboard

Copied

LATEST
 executeee.onClick = function(){ 


eval(tbProp.text);
 }

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines