You won't believe it, but I am having EXACTLY the same problem. But when I asked for help, just like you did, those people in the forums even asked for my CODE ! I guess those were NOOBS, without any knowledge about programming. Why would they even need my code? Can't they just imagine what I did? As if they could ever understand what this random stuff I wrote into SciTE was supposed to do...
Anyways, I am still waiting for an answer, so when you get the appropriate hint, or someone even writes the whole program for you, just hit me up.. otherwise my programm will never work