首页 > 解决方案 > autohotkey 脚本无法检测到第二张图片搜索

问题描述

我仍然是这方面的新手,但我想让它发挥作用。我希望程序上下检查并给我一个结果,但结果总是相同的,即使它不应该是一样的。

这是我现在拥有的代码。

stop:=0
one:=0
two:=0

while(stop<1)
{

ImageSearch, OutputVarX, OutputVarY, 270, 270, 380, 330, *5 G:\image.png
if !errorlevel
{
one=1
}

ImageSearch, OutputVarX, OutputVarY, 270, 790, 380, 850, *5 G:\image.png
if !errorlevel
{
two++
}

sleep 500 ;wait for result to load

if (one=1) && (two=1)
{
stop = 2
msgbox, found up and down
exitapp
}
else if (one=1) && (two=0)
{
msgbox, found only up
}
else if (one=0) && (two=1)
{
msgbox, found only down
} ;end if
} ;end while

当我应该“向上和向下找到”时,我只会得到“仅找到”的结果。我认为这是因为第二个图像搜索实际上并没有通过并在应该的时候工作,任何可能修复的链接都将被应用!

标签: autohotkey

解决方案


推荐阅读