/ Published in: Python
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
from time import time import pymouse lastTime = time() mouse = pymouse.PyMouse() position = mouse.position() away = 0 while(1): if time() >= (lastTime + 60): if mouse.position() == position: position = mouse.position() lastTime = time() away = 1 else: away = 0 position = mouse.position() else: if away == 1: if mouse.position() != position: away = 0 position = mouse.position()
URL: http://affix.me