I've look at the code and it seems that it work intermittently. Don't know if its and issue with TVRage.com or not. But i have another script written in TCL and it is basically the same thing and it seems to be working perfectly. Not sure what is wrong with this one. When i get a chance I'll go through the code entirely and see whats going on.