Activity › Forums › Adobe After Effects Expressions › How to create a button to change text with prompt toolkit
-
How to create a button to change text with prompt toolkit
Posted by Adrián Wulfrath on March 30, 2016 at 6:04 pmHow can i create a button and text fields to change source text in after effects. With Script. In Extend Toolkit.
Adrián Wulfrath replied 10 years, 1 month ago 3 Members · 20 Replies -
20 Replies
-
Kevin Camp
March 31, 2016 at 4:52 pmthis tutorial covers many aspects of creating a GUI panel for after effects with extend script:
https://www.provideocoalition.com/after-effects-extendscript-training-ep-11/
it’s for a floating panel, but I believe they also have one for a dockable panel.
Kevin Camp
Art Director
KCPQ, KZJO & KRCW -
Adrián Wulfrath
March 31, 2016 at 7:44 pmReally Cool, actually i made a Dropdown menu in my Script, but how can i connect that dropdown menu to another dropdownmenu inside AfterEffects of another controller. Here is my Screen Shot and actually i want to link the dropdown menu from myWindow to the DropdownMenu from the Effect Panel inside after effects.
The first layer never going to move. So i think the Array always can be [1] for that layer that have the Dropdown Menu inside the Effects Panel.
-
Dan Ebberts
March 31, 2016 at 8:00 pmIf I understand what you’re doing, I think you need to create an onChange function to update the project whenever the dropdown is changed. It will look something like:
yourDropdownObject.onChange = updateProject;
function updateProject(){
(update project to match new state of dropdown)
}The JavaScript Tools guide should help.
Dan
-
Adrián Wulfrath
March 31, 2016 at 8:04 pmSomething like this will change the dropdown menu inside my Effect panel according to the dropdown menu in MyWindow?????:
//Creating My Window
var myWin = new Window (“palette”,”Canal 5 Controles”,undefined);
myWin.orientation = “row”;var groupOne = myWin.add(“panel”,undefined,”MasterControles”);
groupOne.orientation = “column”;
groupOne.add (“image”,undefined,”~/Desktop/LogoC5Ctrl.png”)
groupOne.add(“statictext”,undefined,”Primer Grupo”)
var dd = groupOne.add(“dropdownlist”,undefined,[“OFF”,”Amarillo”]);
dd.selection = 0;
groupOne.add(“checkbox”,undefined,”Caritas”);//Action of my DropDownMenu
dd.onChange = updateProject;function updateProject(){
(update project to match new state of dropdown)
}myWin.center();
myWin.show(); -
Dan Ebberts
March 31, 2016 at 8:12 pmYeah, like that. Inside the function, you need to have code that navigates to the comp/layer/effect/property that needs to be updated and sets the appropriate value.
Dan
-
Adrián Wulfrath
March 31, 2016 at 8:25 pmI made this to prove the Dropdown menu and it works with the Tint Effect but, always change the value to 0, but how can i work with the PseudoEffect???? and detect the dropdown menu list???
//Creating My Window
var myWin = new Window (“palette”,”Canal 5 Controles”,undefined);
myWin.orientation = “row”;var groupOne = myWin.add(“panel”,undefined,”MasterControles”);
groupOne.orientation = “column”;
groupOne.add (“image”,undefined,”~/Desktop/LogoC5Ctrl.png”)
groupOne.add(“statictext”,undefined,”Primer Grupo”)
var dd = groupOne.add(“dropdownlist”,undefined,[“OFF”,”Amarillo”]);
dd.selection = 0;
groupOne.add(“checkbox”,undefined,”Caritas”);//Action of my DropDownMenu
dd.onChange = updateProject;
var lis = dd.selection = 0;
lis = app.project.item(1).layer(1).property(“Effects”).property(“Tint”).property(“Amount to Tint”).setValue([100]);
var lis1 = dd.selection = 1;
lis1 = app.project.item(1).layer(1).property(“Effects”).property(“Tint”).property(“Amount to Tint”).setValue([0]);myWin.center();
myWin.show(); -
Dan Ebberts
March 31, 2016 at 9:10 pmYou should get Jeff Almasol’s rd_GimmePropPath.jsx script, which will give you the scripting path to any properties in your comp. You can get it here:
https://www.redefinery.com/ae/rd_scripts/
Dan
-
Adrián Wulfrath
March 31, 2016 at 10:23 pmThank you a lot, i will try with that script. Probably i will have another question. So actually i do not close this post.
-
Adrián Wulfrath
March 31, 2016 at 10:55 pmOk i got it, but now how can i assign for each dropdown menu list a different Root Object:
//Creating My Window
var myWin = new Window (“palette”,”Canal 5 Controles”,undefined);
myWin.orientation = “row”;var groupOne = myWin.add(“panel”,undefined,”MasterControles”);
groupOne.orientation = “column”;
groupOne.add (“image”,undefined,”~/Desktop/LogoC5Ctrl.png”)
groupOne.add(“statictext”,undefined,”Primer Grupo”)
var dd = groupOne.add(“dropdownlist”,undefined,[“OFF”,”Amarillo”]);
dd.selection = 0;
groupOne.add(“checkbox”,undefined,”Caritas”);//Action of my DropDownMenu
dd.onChange = updateProject;function updateProject(){
var lis = dd.selection = 1
lis = app.project.item(1).layer(“Control”).property(“Effects”).property(“Control”).property(“Color System”).setValue([4]);
}myWin.center();
myWin.show(); -
Dan Ebberts
March 31, 2016 at 11:55 pmOne way would be to have a different onChange function for each dropdown.
Or you could add code to the function to figure out which dropdown has been modified.
Dan
Reply to this Discussion! Login or Sign Up

