Solved by teixeirajpf in post #2 
              
              
                Well after a while I finaly found something that proved useful: 
 

The accepted answer managed to work for my case. Although I  have to keep calling the main function and go about making a new output event file per scalar to change. I could probably change it to work for multiple pairs of oldnames/…