Here is my actually code, the thing is that i want to change my text from myEditText in my Panel:
function myScript(thisObj) { function myScript_buildUI(thisObj) { var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "My Panel Name", [0, 0, 300, 300]); res="group{orientation:'column', alignment:['fill', 'fill'], alignChildren:['fill', 'fill'],\ myEditText: EditText{text:'EditText text'},\ myButton: Button{text:'Button Name'},\ }" //Add resource string to panel myPanel.grp = myPanel.add(res); var texto = myPanel.grp.myEditText.text.value var btn = myPanel.grp.myButton btn.onClick = function (){ app.project.item(2113).layer("TXT 1").property("Text").property("Source Text").setValue = texto } //Setup panel sizing and make panel resizable myPanel.layout.layout(true); myPanel.grp.minimumSize = myPanel.grp.size; myPanel.layout.resize(); myPanel.onResizing = myPanel.onResize = function () {this.layout.resize();} return myPanel; } var myScriptPal = myScript_buildUI(thisObj); if ((myScriptPal != null) && (myScriptPal instanceof Window)) { myScriptPal.center(); myScriptPal.show(); } } myScript(this);