From c31c2ec15d8de7aad7956102711f4727def2e409 Mon Sep 17 00:00:00 2001 From: Xi Xu Date: Sat, 17 May 2025 18:34:24 +0800 Subject: [PATCH] Update tracker.py --- tracker.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tracker.py b/tracker.py index 420e409..ef00d00 100644 --- a/tracker.py +++ b/tracker.py @@ -31,10 +31,13 @@ def track_mouse_position(refresh_rate=0.1): # Get RGB color at cursor position r, g, b = pyautogui.pixel(x, y) - output = f'"position": ({x:4d},{y:4d}), "color": ({r:3d},{g:3d},{b:3d}),' # Update display in-place without line break - print(f"\r{output}", end="", flush=True) + print( + f'\r"position": ({x:4d},{y:4d}), "color": ({r:3d},{g:3d},{b:3d}),', + end="", + flush=True, + ) # Wait before next update time.sleep(refresh_rate)