【发布时间】:2020-04-12 07:26:07
【问题描述】:
我最近发现了 AutoHotKey,这种脚本语言看起来很棒!
不幸的是,我无法让我的脚本在窗口上找到图像(在我的例子中是 BlueStacks)。 有人可以帮我吗,我的脚本是:
CoordMode, Pixel, screen
CoordMode, Mouse, screen
*ESC::ExitApp
ImgFound := false
while(ImgFound = false)
{
ImageSearch, ButtonX, ButtonY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 C:\Users\...\Documents\...\test.png
if (ErrorLevel = 2)
{
MsgBox Could not execute script.
ExitApp
}
else if (ErrorLevel = 1)
{
ImgFound := false
}
else
{
MsgBox Found.
click, %ButtonX%, %ButtonY%
ImgFound := true
}
}
【问题讨论】:
标签: automation autohotkey