Page 1 of 1

Renaming a Slider or Dropdown

Posted: May 2nd, 2020, 9:28 pm
by CharlieL

So the code I'm working with (full code below!) works, I just don't understand - on the last line, why does

Code: Select all


need to be a parent of

Code: Select all


When I take either one out or shuffle them around, the code no longer works, so it must be important, I just don't understand why. Can anyone explain? In plain English - what are those two referring to and why in that order? Thanks!!

Full code:

Code: Select all

var myComp = app.project.activeItem;
boxLayer = myComp.layer(1);

var dropdownItems = [
    "Item 1",
    "Item 2",
    "Item 3"

var boxLayerDropdown = boxLayer.Effects.addProperty("ADBE Dropdown Control");
var temp =;
temp.propertyGroup(1).name = "This Is My New Dropdown Name";

var boxLayerSlider = boxLayer.Effects.addProperty("ADBE Slider Control");
var temp = = "This Is My New Slider Name";

Re: Renaming a Slider or Dropdown

Posted: November 19th, 2021, 4:51 pm
by James VM

Change to

Code: Select all

var temp = = "This Is My New Slider Name";

You don't need either of them because property(1) is selecting the first property of the slider (moving down in the hierarchy) and propertyGroup(1) is moving up the hierarchy, back to where you were before.

The strange thing is, I now find setPropertyParameters(dropdownitems) no longer works in AE2020!