I know this is years later and its annoying to keep adding to an old thread but it’s along the same lines:
How would you target a selected property to add the expression to, in order to make it more versatile?
this works:
app.project.activeItem.layer(1).property(“Position”).expression = “wiggle(2,2)”;
but this would be more useful, and doesn’t:
app.project.activeItem.selectedLayers.property.expression = “wiggle(2,2)”;
cheers