作者: MasterFocus 最近更新时间: 20090719
Waits until pixel is a certain color (w/ optional timeout)
WaitPixelColor(p_DesiredColor,p_PosX,p_PosY,p_TimeOut=0,p_GetMode="",p_ReturnColor=0)
关于函数的参数和返回值, 请参阅其源码.
The library lacks an external documentation. The source contains a description. Look at the AutoHotkey command PixelGetColor for more information; it is based on it.
关于此函数(集)的更新细节和注意事项, 请参见 AutoHotkey 论坛: http://www.autohotkey.com/forum/topic43807.html
不存在
; #Include WaitPixelColor.ahk #NoEnv SendMode Input SetWorkingDir %A_ScriptDir% CoordMode, Pixel, Screen MsgBox % "This example will wait 2 seconds, and then wait until at position x=640, y=480 the color changes to white." Sleep, 2000 ExitCode := WaitPixelColor(0xFFFFFF, 640, 480, 20000) If (ExitCode = 0) { MsgBox The desired color was found } Else If (ExitCode = 1) { MsgBox There was a problem during PixelGetColor } Else If (ExitCode = 2) { MsgBox The function timed out }