Hi,

The code is right in this thread as a zip attachment. I used it along with DT's Interrupt system and it worked fine.