Unless you have the script apply a preset with your effect and parameter settings, this is probably the best I could come up with:
var comp = app.project.activeItem;
var myEffect = comp.layer(1).property("Effects").addProperty("Drop Shadow");
dans on fire!
oh no, actually this just creates 3 drop shadows, rather than tweaking the specified attribute for each. What is the line for accessing the drop shadows opacity, i cant seem to get it to work:
obviously the middle part of this is wrong. cant figure out what it needs to be
I'm not sure why you would get multiple drop shadows (I don't) but there is something strange going on. It turns out that to get an opacity value of 25%, you actually have to do setValue(63.75). Whatever value you want, multiply it by 2.55 before you do the setValue().
thanks again Dan. Ye its weird about that opacity thing, i cant figure out why. I just did the calculation within the brackets and it seemed to work: