This script is a port of the mouse gesture recognition action script by Didier Brun