As far as I know, if you want to use an automated system to register .uk domains you have to be a Nominet tag holder and have a credit account with them. This will allow and enable you to use their automated system to register .uk TLDs.
If you are after scripts to carry out WHOIS on domains, there are plenty about. Are you just looking for a simple one that will check and report upon domain availability? We have a couple, including one that we have written ourselves and used on our site in the past.
(I am assuming you are looking for a Perl script)