终于还是搞出来了,但是是通过快捷命令插件,建立powershell脚本如下:
# 获取剪贴板中的图片内容
Add-Type -AssemblyName System.Windows.Forms
$clipboardData = [System.Windows.Forms.Clipboard]::GetImage()
$homeDirectory = [System.Environment]::GetFolderPath("UserProfile")
# 将图片内容保存到指定文件中
$filePath = $homeDirectory+"\Documents\image.png"
$directory = Split-Path $filePath
if (-not (Test-Path $directory)) {
New-Item -ItemType Directory -Path $directory | Out-Null
}
$clipboardData.Save($filePath)
tesseract $filePath stdout -l chi_sim
然后截图后调出utools,选这个ocr脚本,就可以了