please help me

help please ??
i wanna make script in mikrotik which connect to tp link router and reboot it

i manually mak it as follow :
i write in new terminal : sys telnet xx.xx.xx.xx
then tp-link router ask for pass i write : PASSWORD
to reboot it i write : sys reboot

please some one say is it possible to make that or i should forget that script ??

Where are the experts to answer this simple question ???