diff --git a/src/renderer/src/panels/Properties.tsx b/src/renderer/src/panels/Properties.tsx index 7482ed3..162e0c7 100644 --- a/src/renderer/src/panels/Properties.tsx +++ b/src/renderer/src/panels/Properties.tsx @@ -655,6 +655,21 @@ function FieldControl({ }; + const pickPointToField = async () => { + setPicking(true); + try { + const region = await window.rpa.desktop.pickRegion(); + const cx = region.x + Math.floor(region.width / 2); + const cy = region.y + Math.floor(region.height / 2); + onChange(field.key, JSON.stringify({ x: cx, y: cy })); + onToast("已拾取坐标:" + cx + " , " + cy); + } catch (error) { + onToast(error instanceof Error ? error.message : String(error), "error"); + } finally { + setPicking(false); + } + }; + if (field.widget === "boolean") { return (