You have three possibilities.
A ) Use SCAR divi. This program uses "Color-picking". It's quite easy to script in it, yet it is hard to find unique Colours.
B ) Use Rbot.org Bot client. This program uses BCEL. You will need to script in Java.
C ) Use Rsbot.net NeXus client. This program uses...