English 中文(简体)
Autohotkeey - 图像搜索
原标题:Autohotkey - ImageSearch

我试图测试一个 GUI, 比较我的当前屏幕和所需的屏幕图像, 看看它们是否匹配 。 我为此使用 AutoHotKey 的图像搜索 。

CoordMode, Pixel
ImageSearch,x,y,0,0,A_ScreenWidth,A_ScreenHeight,*255 C:Documents and SettingsXYZDesktopAutoHotkeyhelp window.bmp
if ErrorLevel=1
    Msgbox 0,Fail,Fail
if ErrorLevel=0
{
    MouseClick, left,  50,  191
    Sleep, 100
}

我不断收到一个错误级别=1. 任何关于我如何解决这个问题的建议。

谢谢 谢谢

问题回答

* 255 将您打乱了您。 这基本上使图像搜索无效, 因为屏幕上的所有东西都与图像匹配。 尝试低一点的东西。 您不太可能需要高于 * 100 。

另外,作为一般提示,尝试使用您重新搜索的图像最小的版本 。





相关问题
How do you control a .NET checkbox from AutoHotKey?

I have a .NET application that contains a checkbox (System.Windows.Forms.Checkbox). This component (WindowsForms10.BUTTON.app.0.378734a1) is not directly controllable in AutoHotKEy using "Control,...

How can I rename my visual studio taskbar button?

I often work with multiple checkouts of the same solution, but as they all have the same name, all the taskbar buttons appear the same. I would like to rename the taskbar buttons so I can identify ...

Run AutoHotkey script when screen locked?

I ve written a couple of scripts with AutoHotkey, but I notice they only work when a user is logged in and the screen isn t locked. I d like to schedule the script to run. Does anyone know if that ...

AutoHotKey key SEQUENCE, not just single-key hotkey

I m not stupid... really. How do you map a key SEQUENCE (ie: Ctrl + Q , F) in AutoHotKey. I ve got Ctrl + Q down: ^q:: I ve even got F: f:: The examples in the help files even show how to do two ...

Where is the source code for AutoScriptWriter

I am using autohotkey for test now but tired with modifying the "Sleep, 100" generated by autoscriptwriter. So I decided to get the source code and see if I can modify it a little bit to fit my needs ...

Holding down the left mouse button in AutoHotkey

I want a script where pressing F1 makes AutoHotkey hold down the left mouse button. I then want the script to release the mouse once I press the key again. How can I do that?

热门标签