From e6c34bafe5f0a103451484bfe689b20b79b33bfb Mon Sep 17 00:00:00 2001 From: yu <191972707@qq.com> Date: Fri, 30 Oct 2026 12:52:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20UIA=20Point=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=90=8D=E4=BF=AE=E6=AD=A3=EF=BC=88System.Windows.Point?= =?UTF-8?q?=EF=BC=89=EF=BC=8C=E8=84=9A=E6=9C=AC=E5=BE=AA=E7=8E=AF=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E6=97=A0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/desktop-picker.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/desktop-picker.ps1 b/resources/desktop-picker.ps1 index ebdf5ae..a16d03b 100644 --- a/resources/desktop-picker.ps1 +++ b/resources/desktop-picker.ps1 @@ -8,7 +8,7 @@ Write-PickLog ("=== start Mode=$Mode ===") Add-Type -AssemblyName UIAutomationClient, UIAutomationTypes, WindowsBase Add-Type -AssemblyName System.Windows.Forms Write-PickLog "assemblies ok" -Add-Type -MemberDefinition "[DllImport(\"user32.dll\")] public static extern short GetAsyncKeyState(int key); [DllImport(\"user32.dll\", CharSet = CharSet.Unicode)] public static extern int GetWindowTextW(IntPtr h, System.Text.StringBuilder sb, int max);" -Name PickW32 -Namespace RpaPick | Out-Null +Add-Type -MemberDefinition '[DllImport("user32.dll")] public static extern short GetAsyncKeyState(int key); [DllImport("user32.dll", CharSet = CharSet.Unicode)] public static extern int GetWindowTextW(IntPtr h, System.Text.StringBuilder sb, int max);' -Name PickW32 -Namespace RpaPick | Out-Null Write-PickLog "w32 ok" if ($Mode -eq "windows") { $wins = @() @@ -48,7 +48,7 @@ function Set-HighlightBox([int]$x, [int]$y, [int]$w, [int]$h) { } function Hide-Highlight { $hl.Hide() } function Get-DeepestAtPoint([double]$px, [double]$py) { - $point = New-Object System.Windows.Automation.Point($px, $py) + $point = New-Object System.Windows.Point($px, $py) $cur = [System.Windows.Automation.AutomationElement]::FromPoint($point) if (-not $cur) { return $null } for ($depth = 0; $depth -lt 25; $depth++) {