diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..3d8329d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,12 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Python Debugger: Current File", + "type": "debugpy", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal" + } + ] +} \ No newline at end of file diff --git a/mouse_position_tracker.py b/mouse_position_tracker.py new file mode 100644 index 0000000..30e1c31 --- /dev/null +++ b/mouse_position_tracker.py @@ -0,0 +1,11 @@ +import pyautogui + +print("按下 Ctrl-C 退出") +try: + while True: + x, y = pyautogui.position() + positionStr = "X: " + str(x).rjust(4) + " Y: " + str(y).rjust(4) + print(positionStr, end="") + print("\b" * len(positionStr), end="", flush=True) +except KeyboardInterrupt: + print("\n") diff --git a/script.py b/reservation.py similarity index 100% rename from script.py rename to reservation.py