I found this program a long time ago, but don't remember where. I couldn't find the original site either.
It is just like other macros, but instead of just recording mouse coordinates and keypresses, it looks for images on the screen. Pretty simple to use too. I've been using it to auto-mine with 4 clients for a while. Here's the link:
<-- Automining script
The script may not work due to you using a different OS or whatever, but a quick glance at it and you should be able to fix it.