Mikrotik add package source script

Hi! I need to create script which will add package source, refresh it and then install new version of available package. But command - /system upgrade upgrade-package-source add user=test address=x.x.x.x require to enter password interactively. How i can do it from script?
Script source:
:local ip x.x.x.x
:local x [/system upgrade upgrade-package-source get number=[find where address=$ip]]
:if ( [:len $x] < 0 ) do={
/system upgrade upgrade-package-source add user=update address=$ip
password
}
/system upgrade refresh
/system upgrade download-all reboot-after-download=yes download-beta=no
Thank you in advance for your response and sorry for my english.