mac telnet login script?

I want to login to associated routers (ALL MT) by mac telnet from within the wireless registration table.
I have a rather long login name and password so if I want to do a small config change on routers I either have to login each by winbox and open terminal to quickly load the config change script or I can login by mac-telnet.
This last is preferred was it not that I have to type my full password and login each time before I can drop the configuration script in…

Is there not a way to make the script also to log-in? After the config is changed unit logs-off anyway so that is not an issue.

What I am looking for is something like (when mac telnet window is opened):

"loginname"
"password"
script

But obviously the password fill is too fast now and rb won’t accept. How to delay the script commands so the device first acknowledge the password and presents the prompt before the rest of the code will be executed?

Look into network management tools that let you apply configuration changes to many nodes, such as rancid. This is obviously not a particularly new or hard problem you’re trying to solve, and it’s been solved many times before and as a result there are many tools available. There’s no point trying to badly reinvent the wheel.

True. Hence my question. I have no experience with network tools whatsoever apart from winbox/ROS-telnet. So any suggestion is indeed appreciated.