This Python script is base for some bigger solutions you need. It will grab mouse coordinates, so you can work on them more.
Make sure that you have pynput module installed, if no, just type "pip install pynput" in cmd.
Simple function get_coords() will just print coordinates on screen.
from pynput import *
def get_coords(x, y):
print("Now at: {}".format((x, y)))
with mouse.Listener(on_move = get_coords) as listen:
listen.join()
Learn More:
Free Python Programming Course
Python Examples
Python How To
Python Modules
No comments:
Post a Comment