Help with name resolution script.

I found the script by changeip on the forum, but my modification does not work. I need it to work on ovpn client rather than pptp-client.

:if ([:resolve vpn.domain.com] != [ /int ovpn-client get [/int ovpn-client find name=ovpn-out] connect-to ]) do={/int ovpn-client set [/int ovpn-client find name=ovpn-out] connect-to=[:resolve vpn.domain.com] }

What’s the best way to achieve this?

Cheers, Mark.

Maybe this script will help you,
http://wiki.mikrotik.com/wiki/Manual:Scripting-examples#Resolve_host-name