问题描述
你好吗?
我正在使用 AHK v1.1.33.06 并且我正在尝试执行一个简单的脚本,该脚本尝试在整个屏幕上查找图像,但它永远无法工作,我可以在屏幕上看到图像,但代码可以不是哈哈。
我也试图寻找完整图像的一部分,但我得到了同样的错误...
这是我的代码:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance,Force
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
CoordMode Pixel
WinActivate,Kakele
while 1 = 1
{
sleep,5000
;ImageSearch,OutputvarX,Outputvary,711,343,Reflect.bmp
ImageSearch,x,y,%A_ScreenWidth%,%A_ScreenHeight%,*w12 *h12 Reflect.JPG
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 %x%x%y%.
;sleep,100
}
return
我尝试过 jpg、png 和 bmp 格式,但我的代码从未找到图像。我尝试了 *w12 和 *h12,因为这是图像片段分辨率。
请看我要找的图片,第一个是整个游戏的完整画面,第二个是左上区域的图标片段,双剑一个。
是否有任何提示或我做错了什么?我快疯了,因为这个。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)