我需要通过透明度查找图像(在游戏中检测文本),因为背景每几秒钟就会改变。我的脚本如下:
#include <ImageSearch.au3>
HotKeySet("s", "Start")
$x = 0
$y = 0
Func Start()
$Search = _ImageSearchArea("*Trans0x40FF00 " & "trans_test.png",1,90,90,@DesktopWidth,@DesktopHeight,$x,$y,50)
If $Search = 1 Then
MouseMove($x, $y,10)
EndIf
EndFunc
While 1
Sleep(100)
WEnd
它不能正常工作。我要搜索的图像周围有一种明亮的绿色,表示透明度为0x40FF00
。如何使我的图像匹配?