script to resolve DNS names and update address list

Hey,
could a script like this one help in a scenerio like this one?
http://forum.mikrotik.com/t/how-to-nat-from-a-hostname/15922/1

I haven’t solved it yet.
Thanks!