Dear Dan,
Many thanks for this script that does exactly what I need to do. You are definitely the champion of AE scripting.
I do program quite a bit myself but, for some reason, I seem to have a serious JavaScript blockage. Perhaps it is the difficulty of passing variable values from one evaluation to the next…
In any case, many many thanks. I will spending tomorrow trying to figure out how you did this!