21.17 Win10如何从GUI控件中复制文字 https://scz.617.cn/windows/202202261746.txt A: scz 2011 Control Content Saver http://jacquelin.potier.free.fr/controlcontentsaver/ http://jacquelin.potier.free.fr/exe/controlcontentsaver_bin.zip A: bluerust 2022-02-25 -------------------------------------------------------------------------- Visual Studio Installer Modify Individual components C++ core features (选中) -------------------------------------------------------------------------- Visual Studio Tools Spy++ -------------------------------------------------------------------------- "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\" 用Visual Studio中的Spy++,"Find Window"去看指定控件。可以绿色化 spyxx.chm spyxx.exe spyxx_amd64.chm spyxx_amd64.exe spyxxhk.dll spyxxhk_amd64.dll api-ms-win-crt-convert-l1-1-0.dll api-ms-win-crt-runtime-l1-1-0.dll "Find Window"用不上最后两个.dll,即使缺失也能满足原始需求。 Spy++可以用作"星号查看器"。 A: 2022-04-13 参看 -------------------------------------------------------------------------- AutoIt https://www.autoitscript.com/site/autoit/ https://www.autoitscript.com/site/autoit/downloads/ https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3.zip https://www.autoitscript.com/files/autoit3/autoit-v3.zip AutoIt Window Information Tool https://www.autoitscript.com/autoit3/docs/intro/au3spy.htm -------------------------------------------------------------------------- autoit-v3.zip中有两个文件 Au3Info.exe Au3Info_x64.exe 也可以看普通的星号,与Spy++相比,没什么优势,记录备忘。 D: bluerust 2022-02-25 用tesseract做OCR。在WSL1中 sudo apt-get install tesseract-ocr 缺省不支持chi_sim,需要自己补充 https://github.com/tesseract-ocr/tessdata/ https://github.com/tesseract-ocr/tessdata/blob/main/chi_sim.traineddata sudo cp chi_sim.traineddata /usr/share/tesseract-ocr/tessdata/ tesseract -l eng some.jpg stdout tesseract -l chi_sim some.jpg stdout 不过用tesseract处理secpol.msc截图时,OCR失败。 D: tk 2022-02-25 参看 Copy text from pictures and file printouts using OCR in OneNote https://support.microsoft.com/en-us/office/copy-text-from-pictures-and-file-printouts-using-ocr-in-onenote-93a70a2f-ebcd-42dc-9f0b-19b09fd775b4 用OneNote 2016 OCR,支持中文、英文OCR。据tk说,OneNote后面是bing的OCR引擎。 将截图贴入OneNote 2016 右键选中图片 使图像中的文本可搜索 英语(美国) // 英文OCR时必须切至该项 中文(中国) // 中文OCR时必须切至该项 复制图片中的文本 // 最终的OCR操作 A: scz 2022-12-25 "Microsoft Store"中搜"Microsoft PowerToys",安装后它有个OCR功能,配置时名 字是"文本提取器",激活方式是"Win+Shift+T",然后出现选择框,框选后自动OCR到 剪贴板,贴粘出来就是文字版。试用后觉得比OneNote 2016方便。 PowerToys的PowerRename功能不太理想;"文件 Locksmith"相当于Process Explorer 的"Find Handle or DLL",可以找出占用目标文件的进程;"图像大小调整器"可以批 量调整图片大小。剩下的功能我遍历后觉得关闭为是,不值一提。 可以不用"Microsoft Store",直接下载安装包安装 https://github.com/microsoft/PowerToys/ https://github.com/microsoft/PowerToys/releases 参看 https://learn.microsoft.com/en-us/windows/powertoys/text-extractor PowerToys的Text Extractor只能识别安装过OCR包的语言,在PowerShell中依次执行 如下两条命令获取该列表 $ [Windows.Media.Ocr.OcrEngine, Windows.Foundation, ContentType = WindowsRuntime] IsPublic IsSerial Name BaseType -------- -------- ---- -------- True False OcrEngine System.Runtime.InteropServices.WindowsRuntime.RuntimeClass $ [Windows.Media.Ocr.OcrEngine]::AvailableRecognizerLanguages DisplayName : 英语(美国) LanguageTag : en-US NativeName : English (United States) Script : Latn LayoutDirection : Ltr AbbreviatedName : ENG DisplayName : 中文(简体,中国) LanguageTag : zh-Hans-CN NativeName : 中文(中华人民共和国) Script : Hans LayoutDirection : Ltr AbbreviatedName : 简体 D: scz 2023-09-22 最近的PowerToys升级,好像在某些环境中引入BUG,比如「调整图片大小」功能,选 中图片后通过右键菜单呼叫此功能时,无法弹出GUI。临时解决方案是,直接打开下 列程序,手工选中图片,可批量选中,后续操作不变。 "C:\Program Files\PowerToys\PowerToys.ImageResizer.exe"