It is possible to get the codes from that ECP_resources array, it's just very tedious work.
Basically you look for }, and press enter after the comma and do that for every element in the array.
Then you can count which code is the 41st element and so on. Just remember that count starts from 0 (so the first element is 0, second is 1 and so on).
As in the ECP_resources array goes like this basically
[{<some code 0>},{<some code 1>},{<some code 2>},{<some code 3>}]
So you need to start separating those in some text file to one per line so that it looks like this
[
{<some code 0>},
{<some code 1>},
{<some code 2>},
{<some code 3>}
]
and count them (starting from zero) to get which one the select command selects.
When you have the codes then you basically need to make functions out of the codes and call them instead of the ECP_resources select XX stuff.