# 滑动选择探针:对若干物理坐标输出 实际命中 vs 地面真值 $ErrorActionPreference = 'Stop' $exe = 'E:\002_Demo\One_click_run_wpf\src\OneClickRun\bin\Debug\net8.0-windows\OneClickRun.exe' $logFile = Join-Path $env:APPDATA ('OneClickRun\logs\app-{0}.log' -f (Get-Date -Format 'yyyyMMdd')) # 清理本路径残留实例 Get-Process -Name 'OneClickRun' -ErrorAction SilentlyContinue | Where-Object { $_.Path -eq $exe } | ForEach-Object { Stop-Process -Id $_.Id -Force } $points = @( '1024,576', # 轮盘中心(枢纽,应无方向) '1174,576', # 右,环内 '1024,426', # 上,环内 '874,576', # 左,环内 '1024,726', # 下,环内 '1424,576', # 右,环外 '1024,176', # 上,环外 '1244,796', # 右下,环外 '624,576', # 左,环外 '824,776', # 左下,环外 '-500,900', # 副屏(左侧显示器,100%) '-960,1153', # 副屏中心 '0,613' # 副屏右边缘 ) foreach ($pt in $points) { $p = Start-Process -FilePath $exe -ArgumentList @('--probe', $pt) -PassThru if (-not $p.WaitForExit(15000)) { Stop-Process -Id $p.Id -Force; Write-Output "$pt => 超时"; continue } if (-not (Test-Path $logFile)) { Write-Output "$pt => 无日志文件 $logFile"; continue } $lines = Get-Content $logFile $probeLine = $lines | Where-Object { $_ -like '*Probe: *' } | Select-Object -Last 1 if ($probeLine) { Write-Output $probeLine } else { Write-Output "$pt => 无 Probe 行" } Start-Sleep -Milliseconds 300 }