VPN PPTP-Client connect-to problem

I have setup VPN PPTP server for my several locations. All have ADSL connection and DynamicDNS domain names. Connections are nailed-up. My problem is when I set up PPTP-Client like this

name="connection" max-mtu=1460 max-mru=1460 mrru=disabled connect-to=user1.dyndns.org user="user1" password="passw234" 
      profile=default-encryption add-default-route=no dial-on-demand=no allow=pap,chap,mschap1,mschap2

every time when my IP address is changed on server location, this router can’t connect on server again. When I enter connect-to field again router resolve it in IP and save that address instead domain name.

So is any way to save domain name without resolve, and then my problem will be solved. If some script can change this record every time when DDNS record is updated, I think that can work fine to.

You have to run a scheduled script, here is an example
http://wiki.mikrotik.com/wiki/Scripting-examples#Resolve_host-name

I tried to set up my script, but I’m not sure that I succeed, probably because I’m rookie in this scripting.
Can you write me a script for dates I give you in post?

Thanks in advance!!!

:local resolvedIP [:resolve "user1.dyndns.org "];
:local ID [/interface pptp-client find name="connection"];
:local currentIP [/interface pptp-client get $ID connect-to];

:if ($resolvedIP != $currentIP) do={
   /interface pptp-client set $ID address=$resolvedIP;
   /log info "ip updated";
}