Delete nn.py
This commit is contained in:
parent
7979a980dc
commit
7c3ecdbef5
36
soup/nn.py
36
soup/nn.py
|
@ -1,36 +0,0 @@
|
||||||
from pynput import mouse
|
|
||||||
from PIL import ImageGrab
|
|
||||||
|
|
||||||
|
|
||||||
def on_move(x, y):
|
|
||||||
# image = ImageGrab.grab()
|
|
||||||
print('Pointer moved to {0}'.format((x, y)))
|
|
||||||
# color = image.getpixel((x, y))
|
|
||||||
# print(color)
|
|
||||||
|
|
||||||
def on_click(x, y, button, pressed):
|
|
||||||
print('{0} at {1}'.format(
|
|
||||||
'Pressed' if pressed else 'Released',(x, y)))
|
|
||||||
|
|
||||||
#if not pressed:
|
|
||||||
|
|
||||||
#print(x, y)
|
|
||||||
|
|
||||||
def on_scroll(x, y, dx, dy):
|
|
||||||
print('Scrolled {0} at {1}'.format(
|
|
||||||
'down' if dy < 0 else 'up',
|
|
||||||
(x, y)))
|
|
||||||
|
|
||||||
# Collect events until released
|
|
||||||
with mouse.Listener(
|
|
||||||
on_move=on_move,
|
|
||||||
on_click=on_click,
|
|
||||||
on_scroll=on_scroll) as listener:
|
|
||||||
listener.join()
|
|
||||||
|
|
||||||
# ...or, in a non-blocking fashion:
|
|
||||||
listener = mouse.Listener(
|
|
||||||
on_move=on_move,
|
|
||||||
on_click=on_click,
|
|
||||||
on_scroll=on_scroll)
|
|
||||||
listener.start()
|
|
Reference in a new issue