|
在学习找图前,在论坛上看了很多贴子,并且下载了ImageSearch.au3.我的AU3安装在C盘,因此,我将ImageSearch.au3放置在C:\Program Files\AutoIt3\Include文件夹中,其它文件ImageSearchDLL.cbp/ImageSearchDLL.cpp/ImageSearchDLL.dll/stdafx.cpp/stdafx.h/util.cpp/util.h均被我放在了我写脚本的文件D:\script中,写了个测试脚本
#Include <ImageSearch.au3>
$x1=0
$y1=0
$result = _ImageSearch("..\jj.bmp",1,$x1,$y1,0)
if $result=1 Then
MsgBox(0,"hello","good")
EndIf
提示错误:
line 44(file "C:\Program Files\AutoIt3\Include\ImageSearch.au3")
if $result [0]="0" then return 0
if $result^ ERROR
Error: Subscript used with non-array variable.
请教:是不是我的把ImageSearch.au3及相关的DLL放的问题,还是我的代码有问题,请指正.谢谢 |
|