Page 1 of 1

Use the currently selected property in Script

Posted: January 23rd, 2018, 6:56 am
by SundancePioneer
Hi folks,

i want to create a script that applies an expression to the currently selected (color) property. 

How can i use the currently selected property in a script? The path is always different, because a color value can sit in different groups/depths. 

How can i set the currently selected color value as var so i can reuse it to apply the expression? 

Thanks in advance :) 

Greetings

Sundance

Re: Use the currently selected property in Script

Posted: January 30th, 2018, 3:45 am
by berniebernie

Code: Select all

var output = "Selected properties:\n";
for(prop in properties = app.project.activeItem.selectedProperties){
    output += properties[prop].name+" ("+properties[prop].matchName+")\n";
}
alert(output);