|
本帖最后由 tanyinhua 于 2014-3-18 17:03 编辑
我在论坛搜索找到了ImageSearch的DLL,放在了脚本目录下,但运行会提示错误,下面是函数代码:
$result = _ImageSearchArea("1.bmp", 1, 0, 0, 500, 500, $x1, $y1, 0)
If $result = 1 Then
MsgBox(0, 0, $x1&","$y1)
ExitLoop
EndIf
这句的意思我自己是这么理解的
$result = _ImageSearchArea("图片路径", 相似度, 起点x, 起点y, 宽, 高, 返回的坐标x, 返回的坐标y, 像素)
执行后提示错误如下
D:\我的文档-桌面-收藏夹\桌面\找图.au3(1,59) : WARNING: $x1: possibly used before declaration.
$result = _ImageSearchArea("1.bmp", 1, 0, 0, 500, 500, $x1,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\我的文档-桌面-收藏夹\桌面\找图.au3(1,64) : WARNING: $y1: possibly used before declaration.
$result = _ImageSearchArea("1.bmp", 1, 0, 0, 500, 500, $x1, $y1,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\我的文档-桌面-收藏夹\桌面\找图.au3(3,22) : ERROR: syntax error
MsgBox(0, 0, $x1&","$y1
~~~~~~~~~~~~~~~~~~~~^
D:\我的文档-桌面-收藏夹\桌面\找图.au3(4,10) : ERROR: 'ExitLoop' not allowed outside loop.
ExitLoop
~~~~~~~~^
D:\我的文档-桌面-收藏夹\桌面\找图.au3(1,59) : ERROR: $x1: undeclared global variable.
$result = _ImageSearchArea("1.bmp", 1, 0, 0, 500, 500, $x1,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\我的文档-桌面-收藏夹\桌面\找图.au3(1,67) : ERROR: _ImageSearchArea(): undefined function.
$result = _ImageSearchArea("1.bmp", 1, 0, 0, 500, 500, $x1, $y1, 0)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\我的文档-桌面-收藏夹\桌面\找图.au3 - 4 error(s), 2 warning(s)
寻求帮助,希望大神帮忙解答下,谢谢。。 |
|