Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

How to change Source Text with EditText in my Script?

$
0
0

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

Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>