All of the interpolators return the min value (0 in this case) before the interval and the max value (360) after the interval. But since the ease() interval happens at the end of each 3-second interval, there is no “after”, only “before” and “during”. Make sense?
An expression can only change the value of the property where that expression exists, so no, you can’t change a layer’s source text from an expression applied somewhere else.
You can probably create your script in any simple text editor that will generate a plain text file. Notepad will work on Windows.
I’m not 100% sure, but I think it’s unlikely that there’s an AE UI event that you could attach to so that your script would run automatically when you change something in a comp. You’re probably stuck launching the script manually.
total = 0; for (i = 1; i < index; i++){ if (thisComp.layer(i).opacity == 100){ total += thisComp.layer(i).sourceRectAtTime(time,false).width; } } total