Thanks for answer, even if I will skip the part "I spent an hour to explain you this" because almost everyone in this forum actually dedicated endless hours for WoG, so it is not the purpose.
I am very interested about how it will all this look at the end. You make a lot of statements I am not sure of, as ERM being buggy or hard to read its own codes or hard to understand, but there are people here who certainly will understand them better and apply your research for a better experience.
A lot of codes in your examples are pointless (setting the resource variable each time before modifying it), but I guess you need them to create a working ECG, so I will not comment them without looking in the finished tool.
I have a personal opinion about WoG which may not be shared by others: only choosen people will overcome its difficulties. What that means?
From HC ERM help thread I noticed that no matter how much you help people with codes/understanding the language, if they are not motivated and having OWN ideas, they will not improve. The one who HAS ideas and IS addicted fan will do everything and eventually become an ERM moder. There are few chances that a person who made so many efforts will rely on an automated tool for custom actions. Mostly because NOW he enjoys scripting and does not fear the long process.
But: if your tool really does what you mean then it will be an inestimable addition to the bunch of tools we have here, and all are for a better WoG. Keep the good work