Hey Dan – long time no brain pick! Thanks for looking at this.
It didn’t work for me I’m afraid & not I’m sure I understand why.
I’ve attached a reduced version to help illustrate it better…
In ‘CompNames’ I have a single text layer that I’ve named ‘Russia’.
I need the code to ‘look into’ CompAreas and find the layer that starts with ‘Russia’.
(Russia,6600000,6600)
I then need it to return the value after the fist comma (6600000) which, I will then use in a RangeMapper function to drive the scale. (I can try and work this bit out).
So, if I change the text to say ‘Canada’, it will find the layer starting with Canada (Canada,3800000,3800) and return 3800000.
FYI: (the second value after the last comma is just the first value/1000, because sometimes AE freaks out with numbers over 32K)
Once I have this working, I can then paste it to all the country names in my comp & (hopefully) I can get them to scale relative to land area.
P