AutoHotkey识别图片
一、下载ImagePut插件
下载地址:GitHub - iseahound/ImagePut: A core library for images in AutoHotkey. Supports AutoHotkey v1 and v2.
二、将插件和要搜索的图片导入项目
#Include ./plugin/ImagePut.ahk
; 截取当前屏幕
pic := ImagePutBuffer('0')
point := pic.ImageSearch('./image/image.png')
if (IsObject(point)) { ; 判断是否为数组(即搜索成功)MsgBox('x' point[1] ' y' point[2])
} else {MsgBox('未找到图像,返回值:' point)
}