Expressions/Scripts/Presets

Moderator: Paul Tuersley

 
SundancePioneer
Topic Author
Posts: 4
Joined: Tue Feb 28, 2017 4:04 am

Use the currently selected property in Script

Tue Jan 23, 2018 6:56 am

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
 
berniebernie
Posts: 33
Joined: Mon Feb 07, 2005 7:32 am
Contact:

Re: Use the currently selected property in Script

Tue Jan 30, 2018 3:45 am

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

Who is online

Users browsing this forum: No registered users and 2 guests