Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to create a button to change text with prompt toolkit

  • Kevin Camp

    March 31, 2016 at 4:52 pm

    this 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 pm

    Really 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 pm

    If 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 pm

    Something 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 pm

    Yeah, 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 pm

    I 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 pm

    You 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 pm

    Thank 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 pm

    Ok 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 pm

    One 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

Page 1 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy