Closing a coded window when mouse moves via script


#1

Is there a way to open a window(created via script), but if the mouse moves, it close automatically?
Preferably with python.