import pyautogui
import time
print("Move the cursor where you want and press CTRL + C to stop.\n")
time.sleep(2)
try:
while True:
x, y = pyautogui.position()
position_str = f"X: {x} | Y: {y}"
print(position_str, end='\r') # overwrite on the same line
time.sleep(0.1)
except KeyboardInterrupt:
print("\nThe final coordinates have been copied.")
import time
print("Move the cursor where you want and press CTRL + C to stop.\n")
time.sleep(2)
try:
while True:
x, y = pyautogui.position()
position_str = f"X: {x} | Y: {y}"
print(position_str, end='\r') # overwrite on the same line
time.sleep(0.1)
except KeyboardInterrupt:
print("\nThe final coordinates have been copied.")
Last edited: