自动可以使用" PixelSearch"和" ControlClick"和" PixelGetColor"在bluestacks上

时间:2015-01-14 07:57:51

标签: autoit bluestacks

可以在后窗蓝图上使用“PixelSearch”和“ControlClick”以及“PixelGetColor”

我想在bluestacks和hind windows中运行bot,但是PixelSearch只能在Windows上使用

我想使用PixelSearch找到颜色,如果为真,点击其他点并在后窗中工作

Local $hwnd, $Cor
$hwnd = WinGetHandle("WindowsForms10.Window.8.app.0.33c0d9d")
While 1
$Cor = PixelSearch(460, 271, 511, 323, 0x9D6F47,$hwnd )
If Not @error Then
	ControlClick ( "BlueStacks App Player","","", "left" ,  1 , 477, 277 )
	sleep(200)
EndIf

$Cor = PixelSearch( 546, 212, 598, 267, 0x431567,$hwnd )
If Not @error Then
	ControlClick ( "BlueStacks App Player","","", "left" ,  1 , 608, 512 )
	sleep(200)
EndIf
WEnd

我尝试这个代码,当蓝色堆栈在fornt但我移动屏幕或后蓝色堆栈不起作用时它可以工作

1 个答案:

答案 0 :(得分:0)

您无法捕捉隐藏窗口上的像素。你能做什么让它看起来很快( 是时候进行捕获)然后搜索内存中的像素。

这是一个非常快速的过程。看看这个:

http://www.autoitscript.com/forum/topic/126430-advanced-pixel-search-library/