Great script. Almost exactly what I'm looking for except that I need to capture touch events outside of the application. My goal is to create metrics to determine how often the touch interface is used on a touch device. Any help would be appreciated.