ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Scripting: Update text fields, sliders, checkbox, etc. from pop-out script panel

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Paul Connors
Scripting: Update text fields, sliders, checkbox, etc. from pop-out script panel
on Sep 17, 2019 at 4:50:09 pm

Hello. I'm trying to connect the elements of a standalone ScriptUI pop-out that I'm building using a WYSIWYG builder (P9UI) to that corresponding layers within a "Controller" precomp. Basically, I've create a "Controller" composition that has a whole bunch of text layers, sliders, check boxes, etc. that control all the layers (nested in precomps) that create the full-length of my MASTER composition. I'd love to be able to use the pop-out UI via scripting that would control all these elements rather than having to go into the "Controller" composition and update each layer individually.

I explored doing this via the Essential Graphics panel, but the amount of layers within the Controller comp make the Essential Graphics panel way, way too long. Using the Script WYSIWYG builder I'm able to organize everything into a much easier to see / use space.

So, here goes ... Here is the current code that makes up the UI for the controller script I'm building:


win=new Window("window","new project",[0,0,500,500],{resizeable:true,independent:false,minimizeButton:false,maximizeButton:false,});
panel_1=win.add("panel",[5,5,965,545]);
textBox_1_header=panel_1.add("statictext",[10,5,80,25] ,"Text Box 1",{multiline:true});
textBox_1=panel_1.add("edittext",[5,25,75,45] ,"Enter Text 1",{readonly:0,noecho:0,borderless:0,multiline:0,enterKeySignalsOnChange:0});
template_Header=panel_1.add("statictext",[10,55,120,75] ,"Template Selection",{multiline:true});
checkbox_Header=panel_1.add("statictext",[10,105,120,125] ,"Checkbox Selection",{multiline:true});
group_1=panel_1.add("group",[5,125,115,170],"undefined");
group_1.graphics.backgroundColor = group_1.graphics.newBrush (group_1.graphics.BrushType.SOLID_COLOR,[0.25,0.25,0.25]);
row_1_boxHigh=group_1.add("checkbox",[5,5,115,25],"Row 1");
row_1_boxHigh.value=0
row_2_boxHigh=group_1.add("checkbox",[5,25,115,45],"Row 2");
row_2_boxHigh.value=0
number_Header=panel_1.add("statictext",[10,180,120,200] ,"Number Selection",{multiline:true});
color1_Header=panel_1.add("statictext",[10,230,120,250] ,"Color Selection",{multiline:true});
colorInput_1=panel_1.add("edittext",[5,250,75,270] ,"ffffff",{readonly:0,noecho:0,borderless:0,multiline:0,enterKeySignalsOnChange:0});
template_Select=panel_1.add("dropdownlist",[5,75,105,97] ,["1","2"]);
number_Select=panel_1.add("dropdownlist",[5,200,105,222] ,["1","2","3","4","5"]);
win.center();
win.show();


And here is what I have in terms of corresponding compositions and elements:

• A precomp named "Script Connection Test"
• A null named: "Controller Null" which contains the following:
--- A slider named: "Template Selection"
--- A checkbox named: "Row 1"
--- A checkbox named: "Row 2"
--- A slider named: "Number Selection"
• A text layer named "textBox_1"
• A text layer named "colorInput_1"

Would anyone be able to give me a crash course on how to edit the code in my script to connect to my layers to make the updates?

Any help would be greatly appreciated.

Thank you!


Return to posts index

Tomas Bumbulevičius
Re: Scripting: Update text fields, sliders, checkbox, etc. from pop-out script panel
on Sep 22, 2019 at 9:58:21 am

Hey Paul, to be honest, its completely unclear what, project wise, you want to be affected with these controllers.

And to be even further honest (sorry!), this GUI is 1/100 puzzle piece from the whole picture!

Now after I finished this moment of pure honesty (haha), here is what you should or could do, assuming you have prior programming experiences:
1. Learn how to access .aep project items & layers;
2. Learn how to connect them with the event handlers from GUI (button click, checkbox check, etc)
3. Plan functionality how and what should be affected by controllers, build the logic.
4. Connect everything into one puzzle.

The best place to start if you are curious - Extendscript Course by David Torno. One of the best to grasp extendscript :)

Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview


Return to posts index

Paul Connors
Re: Scripting: Update text fields, sliders, checkbox, etc. from pop-out script panel
on Sep 22, 2019 at 12:48:45 pm

Hi Tomas. Thanks very much for your response. I've come across the Extendscript Course before, but there was so much content there it was difficult to know where to start. You're breakdown of steps will be very helpful on that front. Looks like I've got some homework! Thanks again!


Return to posts index


Tomas Bumbulevičius
Re: Scripting: Update text fields, sliders, checkbox, etc. from pop-out script panel
on Sep 22, 2019 at 4:18:55 pm

Paul, happy to see your positive attitude - well done! If you are up to the challenge, then I strongly suggest you to go through all of those course. Definitely, it won't be the fasters learning curve, but it will give you the most of clarity and helps to get a feet wet. From that point - no limits (well, allllmost! 😃 )

Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]