It was relatively bug free, you missed one $ but I do that all the time. I'm currently working an issue where it seems to not be capturing part of the screen at least it hit an undefined array element. I think it I can get it worked out it will be much faster.
Thanks for your help