Look at the last script on this page:
http://forum.mikrotik.com/t/need-help-with-script-to-make-simple-queue-for-dhcp-entries/53490/1
I’m going to “fine tune” that script for my own use. I need extra functionality to change Queue names if the Hostname on the DHCP Lease change. But for now, that script is pretty neat.