Just to link this all together... I now have a working script for this and it is posted over in the developers forum in case anyone wants to use it...
http://moodle.org/mod/forum/discuss.php?d=123723
Roles and permissions
Script to add specific users to certain courses
This discussion has been locked so you can no longer reply to it.