Skip to content

Releases: whale-and-rice/dsh-pc-hands

v0.8.0 · 区域截屏 / 锚点点击 / 点击验证 / 等文字消失

Choose a tag to compare

@whale-and-rice whale-and-rice released this 24 Oct 04:36

本次四条改进,全部来自 TIA + EET 联调里的真实翻车:

  • shot/see --region x0,y0,x1,y1:只截一块,小区域先放大 2 倍再 OCR。
    实测整屏会把「外部源文件」读成「外部源件」(吞字),放大后读对;整屏 4 秒 → 区域 0.4 秒。
  • click --near 锚文字 --dir down --dy 40:按文字锚点偏移点击,替代手算坐标。
    今天点偏 6 次,其中「从源生成块」差 20px 就点成了「交叉引用」。
  • click --verify 文字:点完自动 OCR 附近区域,没出现就报失败(退出码非 0)。
  • waittext --gone / --region:等文字消失(转圈、"请稍候")、区域等待,超时返回 3。

验证:py_compile / node --check 通过;区域截屏+OCR、锚点点击、区域等待(0.4s 命中)、超时退出码,均在本机实测。

v0.7.0 — 等文字 / 精细滚动 / 点标签

Choose a tag to compare

@whale-and-rice whale-and-rice released this 23 Oct 13:11

v0.7.0 — 今天实战踩出来的五条

  • pc_wait:等某段文字出现(OCR 轮询),不再靠 sleep 猜时间
  • pc_scroll 支持 pixels(精细,40 左右很顺)和 untilText(滚到看见为止)
  • pc_click 支持 labelText:勾选框/单选按坐标点不动时点它旁边的文字
  • pc_type 支持 secret:密码/令牌粘完立刻清空剪贴板
  • pc_doctor 在缩放 ≠ 100% 时给 WARN
  • 文字匹配统一不区分大小写

工具数 18 → 19。附 dsh-pc-hands-0.7.0.tgz(npm 包)与 .zip(完整包)。

v0.6.1 — 自带脚本 + 三种装法

Choose a tag to compare

@whale-and-rice whale-and-rice released this 23 Oct 12:39

v0.6.1

  • 插件包自带 pc/ 脚本:npm i dsh-pc-hands 或解压即用,不再需要单独放脚本目录
  • 三种安装方式:zip / npm(待发布)/ jsDelivr CDN
  • 附:dsh-pc-hands-0.6.1.tgz(npm 包,可直接 npm i ./dsh-pc-hands-0.6.1.tgz 本地装)
  • 附:dsh-pc-hands-0.6.1.zip(完整包,含 setup.cmd)

安装

setup.cmd -WithOCR -InstallPlugin

重启 DSH,然后让 agent 跑 pc_doctor。

v0.6.0 — 18 个工具 + 自检 + DPI 修复

Choose a tag to compare

@whale-and-rice whale-and-rice released this 23 Oct 12:37

dsh-pc-hands v0.6.0

给 AI agent 一双手和一双眼睛(Windows)。

18 个工具:截屏+OCR、按文字点、打字按键、滚轮、剪贴板、窗口操作、弹窗守卫、多步任务执行、环境自检。

这一版的重点

  • pc_doctor:一屏报告 Python / Pillow / 截图 / OCR / DPI / 显示器 / 剪贴板 是否就绪
  • 路径自动发现:config → 环境变量 → 常见位置 → PATH,装错位置会给出可执行的修法
  • DPI 感知(per-monitor-v2):别人 125%/150% 缩放时不会再"点了没反应"
  • 一键安装 setup.cmd(可选 -WithOCR、-InstallPlugin)
  • MIT License

安装

setup.cmd -WithOCR -InstallPlugin

重启 DSH 后让 agent 跑一次 pc_doctor。

需要 Windows 10/11 + Python 3.9+ + Pillow;RapidOCR 可选(没装自动退回系统 OCR)。