0
我正試圖在某個窗口框架中搜索某個指定的像素顏色,並且我希望腳本將左箭頭鍵發送到顏色,然後繼續「攻擊」。這是我的代碼。如果在PixelSearch中找不到顏色,請發送(LEFT)直到找到顏色? | AUTOIT
Func getColor()
$point = MouseGetPos()
$color = PixelGetColor($point[0], $point[1])
MsgBox(0, "Color Set", "The color has been set to " & $color)
EndFunc
Func attackLoop()
MsgBox(0, "Attacking", "Starting to attack")
While 1
$point = PixelSearch(60, 157, 1772, 759, $color)
if IsArray($point) Then
MouseClick("left", $point[0], $point[1])
Sleep($interval)
EndIf
Sleep(50)
WEnd
EndFunc
While 1
sleep(250)
WEnd
爲了達到我的標題,我需要添加些什麼?
嘗試PixelSearch(0,0,@ DesktopWidth,@ DesktopHeight,$ color) 並且可能會添加陰影變化。但要小心,否則你將最終重新啓動你的電腦,而它通過你的顯示器點擊消失:) – Milos 2015-03-09 08:47:04