@d-healey Yes. Ok. I got it.
It has the correct name, but while it had a callback on the main interface onInit, it didn't have the variable definition. So, it worked manually selecting notes, but not with this script.
Thank you, Dave. I crossed this bridge :)