@echo off
chcp 65001 >nul
cd /d "%~dp0"

echo ================================================
echo   Screen Coordinate Measurement Tool
echo ================================================
echo.

REM 查找 Python 路径
set "PYTHON="
if exist "C:\Users\DYB\AppData\Local\Programs\Python\Python313\python.exe" set "PYTHON=C:\Users\DYB\AppData\Local\Programs\Python\Python313\python.exe"
if exist "C:\Users\DYB\AppData\Local\Programs\Python\Python312\python.exe" set "PYTHON=C:\Users\DYB\AppData\Local\Programs\Python\Python312\python.exe"
if exist "C:\Python313\python.exe" set "PYTHON=C:\Python313\python.exe"
if exist "C:\Python312\python.exe" set "PYTHON=C:\Python312\python.exe"

if "%PYTHON%"=="" (
    echo Python not found!
    echo Please install Python or add it to PATH.
    pause
    exit /b 1
)

echo Python found: %PYTHON%
echo.

REM 运行测量程序
"%PYTHON%" measure_screen.py

echo.
pause
