首页 > 解决方案 > 如何使用带有透明图像的 imageSearch?

问题描述

我正在尝试在屏幕上找到透明图像。但它找不到图片,因为它的边缘是透明的。有什么解决方法吗?它可能喜欢图书馆或win api。也许我的使用是错误的。

使用的图像文件:http://pngimg.com/uploads/light/light_PNG14440.png

CoordMode, Pixel, Screen
ImageSearch, FoundX, FoundY, 0,0, A_ScreenWidth, A_ScreenHeight,*50 *TransBlack C:\Users\PC\Desktop\light_PNG14440.png
if (ErrorLevel = 2)
     MsgBox Could not conduct the search.
else if (ErrorLevel = 1)
MsgBox Icon could not be found on the screen.
else
MsgBox The icon was found at %FoundX%x%FoundY%.

我希望输出是The icon was found at 100x100.,但实际输出是Icon could not be found on the screen.

标签: image-processingpngautohotkeytransparent

解决方案


或者使用 ImageSearch 你可以使用FindText


推荐阅读