Что нового

Увеличение скорости реакции бота-кликера.

mr.Gbabak

Осваивающий
Сообщения
257
Репутация
23
Здравствуйте!
Изучаю AutoIT недавно, ставлю задачи и пытаюсь их решать, в связи с чем решил написать робота для простой игрушки "взрыватель[/anc]]http://7ba.ru/ex/download/375568/vzryvatel.zip".
Попробовал вот такой способ:
Код:
Global $Paused
HotKeySet("{F1}", "TPause")
HotKeySet("{ESC}", "vyx")



Opt("MouseCoordMode", 2)
Opt("PixelCoordMode", 2)
WinActivate("Взрыватель")
WinWaitActive("Взрыватель")

While 1
$1  =   PixelGetColor  ( 599, 449)
$2  =   PixelGetColor  ( 559, 449)
$3  =   PixelGetColor  ( 519, 449)
$4  =   PixelGetColor  ( 479, 449)
$5  =   PixelGetColor  ( 439, 449)
$6  =   PixelGetColor  ( 399, 449)
$7  =   PixelGetColor  ( 359, 449)
$8  =   PixelGetColor  ( 319, 449)
$9  =   PixelGetColor  ( 279, 449)
$10  =   PixelGetColor  ( 239, 449)
$11  =   PixelGetColor  ( 199, 449)
$12  =   PixelGetColor  ( 159, 449)

$13  =   PixelGetColor  ( 599, 409)
$14  =   PixelGetColor  ( 559, 409)
$15  =   PixelGetColor  ( 519, 409)
$16  =   PixelGetColor  ( 479, 409)
$17  =   PixelGetColor  ( 439, 409)
$18  =   PixelGetColor  ( 399, 409)
$19  =   PixelGetColor  ( 359, 409)
$20  =   PixelGetColor  ( 319, 409)
$21  =   PixelGetColor  ( 279, 409)
$22  =   PixelGetColor  ( 239, 409)
$23  =   PixelGetColor  ( 199, 409)
$24  =   PixelGetColor  ( 159, 409)

$25  =   PixelGetColor  ( 599, 369)
$26  =   PixelGetColor  ( 559, 369)
$27  =   PixelGetColor  ( 519, 369)
$28  =   PixelGetColor  ( 479, 369)
$29  =   PixelGetColor  ( 439, 369)

$30  =   PixelGetColor  ( 399, 369)
$31  =   PixelGetColor  ( 359, 369)
$32  =   PixelGetColor  ( 319, 369)
$33  =   PixelGetColor  ( 279, 369)
$34  =   PixelGetColor  ( 239, 369)
$35  =   PixelGetColor  ( 199, 369)
$36  =   PixelGetColor  ( 159, 369)
#cs
$37  =   PixelGetColor  ( 599, 329)
$38  =   PixelGetColor  ( 559, 329)
$39  =   PixelGetColor  ( 519, 329)
$40  =   PixelGetColor  ( 479, 329)
$41  =   PixelGetColor  ( 439, 329)
$42  =   PixelGetColor  ( 399, 329)
$43  =   PixelGetColor  ( 359, 329)
$44  =   PixelGetColor  ( 319, 329)
$45  =   PixelGetColor  ( 279, 329)
$46  =   PixelGetColor  ( 239, 329)
$47  =   PixelGetColor  ( 199, 329)
$48  =   PixelGetColor  ( 159, 329)

$49  =   PixelGetColor  ( 599,  289)
$50  =   PixelGetColor  ( 559,  289)
$51  =   PixelGetColor  ( 519,  289)
$52  =   PixelGetColor  ( 479,  289)
$53  =   PixelGetColor  ( 439,  289)
$54  =   PixelGetColor  ( 399,  289)
$55  =   PixelGetColor  ( 359,  289)
$56  =   PixelGetColor  ( 319,  289)
$57  =   PixelGetColor  ( 279,  289)
$58  =   PixelGetColor  ( 239,  289)
$59  =   PixelGetColor  ( 199,  289)
$60  =   PixelGetColor  ( 159,  289)

$61  =   PixelGetColor  ( 599,  249)
$62  =   PixelGetColor  ( 559,  249)
$63  =   PixelGetColor  ( 519,  249)
$64  =   PixelGetColor  ( 479,  249)
$65  =   PixelGetColor  ( 439,  249)
$66  =   PixelGetColor  ( 399,  249)
$67  =   PixelGetColor  ( 359,  249)
$68  =   PixelGetColor  ( 319,  249)
$69  =   PixelGetColor  ( 279,  249)
$70  =   PixelGetColor  ( 239,  249)
$71  =   PixelGetColor  ( 199,  249)
$72  =   PixelGetColor  ( 159,  249)
#ce

if $1 = $2 And $2 = $3 then MouseClick("primary", 599, 449, 1, 0)
if $1 = $13 and $13 = $25 Then MouseClick("primary", 599, 449, 1, 0)

	if $2 = $3 and $3 = $4 Then MouseClick("primary", 559, 449, 1, 0)


		if $3 = $4 and $4= $5 Then MouseClick("primary", 519, 449, 1, 0)

			if $4 = $5 and $5= $6 Then MouseClick("primary", 479, 449, 1, 0)

				if $5 = $6 and $6= $7 Then MouseClick("primary", 439, 449, 1, 0)

					if $6 = $7 and $7 = $8 Then MouseClick("primary", 399, 449, 1, 0)

						if $7 = $8 and $8 = $9 Then MouseClick("primary", 359, 449, 1, 0)

							if $8 = $9 and $9 = $10 Then MouseClick("primary", 319, 449, 1, 0)

								if $9 = $10 and $10 = $11 Then MouseClick("primary", 279, 449, 1, 0)

									If $10 = $11 and $11 = $12 Then MouseClick("primary", 239, 449, 1, 0)

										if $12 = $24 and $24 = $36 Then MouseClick("primary", 159,  449, 1, 0)

	if $13 = $1 and $1 = $2  Then MouseClick("primary", 599, 409, 1, 0)
	if $13 = $14 and $14 = $26 Then MouseClick("primary", 599, 409, 1, 0)
	if $13 = $25 and $25 = $26 	Then MouseClick("primary", 599, 409, 1, 0)
	if $13 = $14 and $14 = $2 Then MouseClick("primary", 599, 409, 1, 0)

		if $14 = $13 and $13 = $15  Then MouseClick("primary", 559, 409, 1, 0)
		if $14 = $13 and $13 = $2  Then MouseClick("primary", 559, 409, 1, 0)
		if $14 = $15 and $15 = $2  Then MouseClick("primary", 559, 409, 1, 0)
		If $14 = $2 and $2 = $26  Then MouseClick("primary", 559, 409, 1, 0)
		if $14 = $2 and $2 = $1   Then MouseClick("primary", 559, 409, 1, 0)
		if $14 = $13 and $13 = $1 Then MouseClick("primary", 559, 409, 1, 0)
		if $14 = $2 and $2 = $3 Then MouseClick("primary", 559, 409, 1, 0)
		if $14 = $15 and $15 = $3 Then MouseClick("primary", 559, 409, 1, 0)
		if $14 = $15 and $15 = $27 Then MouseClick("primary", 559, 409, 1, 0)
		if $14 = $13 and $13 = $25 Then MouseClick("primary", 559, 409, 1, 0)

			if $15 = $14 and $14 = $15 Then MouseClick("primary", 519, 409, 1, 0)
			if $15 = $3 and $3 = $27  Then MouseClick("primary", 519, 409, 1, 0)
			if $15 = $3 and $3 = $4	Then MouseClick("primary", 519, 409, 1, 0)
			if $15 = $3 and $3 = $2 Then MouseClick("primary", 519, 409, 1, 0)
			if $15 = $16 and $16 = $4 Then MouseClick("primary", 519, 409, 1, 0)
			if $15 = $16 and $16 = $28 Then MouseClick("primary", 519, 409, 1, 0)
			if $15 = $14 and $14 = $2 Then MouseClick("primary", 519, 409, 1, 0)
			if $15 = $14 and $14 = $26 Then MouseClick("primary", 519, 409, 1, 0)
			if $15 = $27 and $27 = $26 Then MouseClick("primary", 519, 409, 1, 0)
			if $15 = $27 and $27 = $28 Then MouseClick("primary", 519, 409, 1, 0)


				if $16 = $15 and $15 = $17  Then MouseClick("primary", 479, 409, 1, 0)
				if $16 = $4 and $4 = $28  Then MouseClick("primary", 479, 409, 1, 0)
				if $16 = $15 and $15 = $3  Then MouseClick("primary", 479, 409, 1, 0)
				if $16 = $4 and $4 = $3  Then MouseClick("primary", 479, 409, 1, 0)
				if $16 = $17 and $17 = $5  Then MouseClick("primary", 479, 409, 1, 0)
				if $16 = $17 and $17 = $29  Then MouseClick("primary", 479, 409, 1, 0)
				if $16 = $15 and $15 = $27  Then MouseClick("primary", 479, 409, 1, 0)
				if $16 = $4 and $4 = $5  Then MouseClick("primary", 479, 409, 1, 0)
				if $16 = $28 and $28 = $27 Then MouseClick("primary", 479, 409, 1, 0)
				if $16 = $28 and $28 = $29 Then MouseClick("primary", 479, 409, 1, 0)

					if $17 = $16 and $16 = $18 Then MouseClick("primary", 439, 409, 1, 0)
					if $17 = $5 and $5 =  $29 Then MouseClick("primary", 439, 409, 1, 0)
					if $17 = $18 and $18 = $6 Then MouseClick("primary", 439, 409, 1, 0)


						if $18 = $6 and $6 = $5 Then MouseClick("primary", 399, 409, 1, 0)
						if $18 = $6 and $6 = $7 Then MouseClick("primary", 399, 409, 1, 0)
						if $18 = $17 and $17 = $5 Then MouseClick("primary", 399, 409, 1, 0)
						if $18 = $17 and $17 = $29 Then MouseClick("primary", 399, 409, 1, 0)
						if $18 = $19 and $19 = $7 Then MouseClick("primary", 399, 409, 1, 0)
						if $18 = $19 and $19 = $31 Then MouseClick("primary", 399, 409, 1, 0)
						if $18 = $30 and $30 = $31 Then MouseClick("primary", 399, 409, 1, 0)
						if $18 = $30 and $30 = $29 Then MouseClick("primary", 399, 409, 1, 0)
						if $18 = $17 and $17 = $19 Then MouseClick("primary", 399, 409, 1, 0)
						if $18 = $6 and $6 = $30 Then MouseClick("primary", 399, 409, 1, 0)

							if $19 = $18 and $18 = $20 Then MouseClick("primary", 359, 409, 1, 0)
							if $19 = $7 and $7 = $31 Then MouseClick("primary", 359, 409, 1, 0)

	if $24 = $23 and $23 = $12 Then MouseClick("primary", 159, 409, 1, 0)
	if $24 = $36 and $36 = $23 Then MouseClick("primary", 159, 409, 1, 0)

		if $23 = $11 and $11 = $12 Then MouseClick("primary", 199, 409, 1, 0)
		if $23 = $11 and $11 = $10 Then MouseClick("primary", 199, 409, 1, 0)
		if $23 = $35 and $35 = $36 Then MouseClick("primary", 199, 409, 1, 0)
		if $23 = $35 and $35 = $34 Then MouseClick("primary", 199, 409, 1, 0)
		if $23 = $24 and $24 = $12 Then MouseClick("primary", 199, 409, 1, 0)
		if $23 = $24 and $24 = $36 Then MouseClick("primary", 199, 409, 1, 0)
		if $23 = $22 and $22 = $10 Then MouseClick("primary", 199, 409, 1, 0)
		if $23 = $22 and $22 = $34 Then MouseClick("primary", 199, 409, 1, 0)
		if $23 = $11 and $11 = $35 Then MouseClick("primary", 199, 409, 1, 0)
		if $23 = $24 and $24 = $22 Then MouseClick("primary", 199, 409, 1, 0)

			if $22 = $23 and $23 = $21 Then MouseClick("primary", 239, 409)
			if $22 = $10 and $10 = $34 Then MouseClick("primary", 239, 409)

				if $21 = $9 and $9 = $8 Then MouseClick("primary", 279, 409, 1, 0)
				if $21 = $9 and $9 = $10 Then MouseClick("primary", 279, 409, 1, 0)
				if $21 = $33 and $33 = $34 Then MouseClick("primary", 279, 409, 1, 0)
				if $21 = $33 and $33 = $32 Then MouseClick("primary", 279, 409, 1, 0)
				if $21 = $22 and $22 = $10 Then MouseClick("primary", 279, 409, 1, 0)
				if $21 = $22 and $22 = $34 Then MouseClick("primary", 279, 409, 1, 0)
				if $21 = $20 and $20 = $8 Then MouseClick("primary", 279, 409, 1, 0)
				if $21 = $20 and $20 = $32 Then MouseClick("primary", 279, 409, 1, 0)
				if $21 = $33 and $33 = $9 Then MouseClick("primary", 279, 409, 1, 0)
				if $21 = $22 and $22 = $20 Then MouseClick("primary", 279, 409, 1, 0)

					if $20 = $19 and $19 = $21 Then MouseClick("primary", 319, 409, 1, 0)
					if $20 = $8 and $8 = $7 Then MouseClick("primary", 319, 409, 1, 0)
					if $20 = $8 and $8 = $9 Then MouseClick("primary", 319, 409, 1, 0)
					if $20 = $19 and $19 = $7 Then MouseClick("primary", 319, 409, 1, 0)
					if $20 = $19 and $19 = $31 Then MouseClick("primary", 319, 409, 1, 0)
					if $20 = $32 and $32 = $33 Then MouseClick("primary", 319, 409, 1, 0)
					if $20 = $32 and $32 = $31 Then MouseClick("primary", 319, 409, 1, 0)
					if $20 = $21 and $21 = $9 Then MouseClick("primary", 319, 409, 1, 0)
					if $20 = $21 and $21 = $33 Then MouseClick("primary", 319, 409, 1, 0)
					if $20 = $8 and $8 = $32 Then MouseClick("primary", 319, 409, 1, 0)
								WEnd

ToolTip ("конец", 0,0)
Sleep (3000)

Func TPause()   
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc


Func vyx()  
	ToolTip ( "Good Buy", 0,0)
	Sleep (3000)
	Exit
	EndFunc
но при первом запуске понял, что он очень медленный, и при смене строки уже тыкает не туда куда надо...потому не стал даже продолжать, решил найти другой способ, но в результате даже не смог определить куда двигаться. Догадываюсь, что нужно делать скриншот экрана->анализировать сам скрин в буфере(памяти)-> и собственно клики, без участия PixelGetColor и тем более If..Then?!
Подскажите пожалуйста в каком направлении думать, и желательно ссылки на подобные темы, хоть как-то затрагивающие решение!
 

rusreg79

Продвинутый
Сообщения
159
Репутация
57
Не тестировал, может ошибки есть.
Код:
#include <_PixelGetColor.au3>
Global $Paused,$PositionWin,$vRegion
HotKeySet("{F1}", "TPause")
HotKeySet("{ESC}", "vyx")
Opt("MouseCoordMode", 2)
Opt("PixelCoordMode", 2)


Global $hWnd = WinGetHandle("Взрыватель"); Хендел окна ИГРЫ
Global $sizeWin = WinGetClientSize($hWnd) ; Вернуть размер клиентской области указанного окна.
WinActivate($hWnd)
WinWaitActive($hWnd)

Global $hDll = DllOpen("gdi32.dll")
Global $vDC = _PixelGetColor_CreateDC($hDll)

Dim $a[74]

While 1
	If WinActive ($hWnd) Then

		$PositionWin = WinGetPos($hWnd); Вернуть позицию окна.
		$PositionWin[0] = $PositionWin[0] + (($PositionWin[2] - $sizeWin[0]) / 2) ;Клиентская область 0 X
		$PositionWin[1] = $PositionWin[1] + ($PositionWin[3] - $sizeWin[1]) - (($PositionWin[2] - $sizeWin[0]) / 2) ;Клиентская область 0 Y
		$vRegion = _PixelGetColor_CaptureRegion($vDC, $PositionWin[0], $PositionWin[1],$PositionWin[0]+599, $PositionWin[1]+449,$hDll);Делаем битмап области
		$i = 1
		For $iy = 449 To 249 Step -40
			For $ix = 599 To 159 Step -40
				$a[$i] = _PixelGetColor_GetPixelRaw($vDC, $ix, $iy, $hDll); Читаем на битмапе цвет по координатам xy и запоминаем в массив
				$i +=1
			Next
		Next
		_PixelGetColor_ReleaseRegion($vRegion);Удаляем битмап

		_Click()

	Else
		WinActivate($hWnd);Активировать окно
	EndIf
	Sleep(100)
WEnd


ToolTip("конец", 0, 0)
Sleep(3000)






Func _Click()

	If $a[1] = $a[2] And $a[2] = $a[3] Then MouseClick("primary", 599, 449, 1, 0)
	If $a[1] = $a[13] And $a[13] = $a[25] Then MouseClick("primary", 599, 449, 1, 0)
	If $a[2] = $a[3] And $a[3] = $a[4] Then MouseClick("primary", 559, 449, 1, 0)
	If $a[3] = $a[4] And $a[4] = $a[5] Then MouseClick("primary", 519, 449, 1, 0)
	If $a[4] = $a[5] And $a[5] = $a[6] Then MouseClick("primary", 479, 449, 1, 0)
	If $a[5] = $a[6] And $a[6] = $a[7] Then MouseClick("primary", 439, 449, 1, 0)
	If $a[6] = $a[7] And $a[7] = $a[8] Then MouseClick("primary", 399, 449, 1, 0)
	If $a[7] = $a[8] And $a[8] = $a[9] Then MouseClick("primary", 359, 449, 1, 0)
	If $a[8] = $a[9] And $a[9] = $a[10] Then MouseClick("primary", 319, 449, 1, 0)
	If $a[9] = $a[10] And $a[10] = $a[11] Then MouseClick("primary", 279, 449, 1, 0)
	If $a[10] = $a[11] And $a[11] = $a[12] Then MouseClick("primary", 239, 449, 1, 0)
	If $a[12] = $a[24] And $a[24] = $a[36] Then MouseClick("primary", 159, 449, 1, 0)

	If $a[13] = $a[1] And $a[1] = $a[2] Then MouseClick("primary", 599, 409, 1, 0)
	If $a[13] = $a[14] And $a[14] = $a[26] Then MouseClick("primary", 599, 409, 1, 0)
	If $a[13] = $a[25] And $a[25] = $a[26] Then MouseClick("primary", 599, 409, 1, 0)
	If $a[13] = $a[14] And $a[14] = $a[2] Then MouseClick("primary", 599, 409, 1, 0)
	If $a[14] = $a[13] And $a[13] = $a[15] Then MouseClick("primary", 559, 409, 1, 0)
	If $a[14] = $a[13] And $a[13] = $a[2] Then MouseClick("primary", 559, 409, 1, 0)
	If $a[14] = $a[15] And $a[15] = $a[2] Then MouseClick("primary", 559, 409, 1, 0)
	If $a[14] = $a[2] And $a[2] = $a[26] Then MouseClick("primary", 559, 409, 1, 0)
	If $a[14] = $a[2] And $a[2] = $a[1] Then MouseClick("primary", 559, 409, 1, 0)
	If $a[14] = $a[13] And $a[13] = $a[1] Then MouseClick("primary", 559, 409, 1, 0)
	If $a[14] = $a[2] And $a[2] = $a[3] Then MouseClick("primary", 559, 409, 1, 0)
	If $a[14] = $a[15] And $a[15] = $a[3] Then MouseClick("primary", 559, 409, 1, 0)
	If $a[14] = $a[15] And $a[15] = $a[27] Then MouseClick("primary", 559, 409, 1, 0)
	If $a[14] = $a[13] And $a[13] = $a[25] Then MouseClick("primary", 559, 409, 1, 0)
	If $a[15] = $a[14] And $a[14] = $a[15] Then MouseClick("primary", 519, 409, 1, 0)
	If $a[15] = $a[3] And $a[3] = $a[27] Then MouseClick("primary", 519, 409, 1, 0)
	If $a[15] = $a[3] And $a[3] = $a[4] Then MouseClick("primary", 519, 409, 1, 0)
	If $a[15] = $a[3] And $a[3] = $a[2] Then MouseClick("primary", 519, 409, 1, 0)
	If $a[15] = $a[16] And $a[16] = $a[4] Then MouseClick("primary", 519, 409, 1, 0)
	If $a[15] = $a[16] And $a[16] = $a[28] Then MouseClick("primary", 519, 409, 1, 0)
	If $a[15] = $a[14] And $a[14] = $a[2] Then MouseClick("primary", 519, 409, 1, 0)
	If $a[15] = $a[14] And $a[14] = $a[26] Then MouseClick("primary", 519, 409, 1, 0)
	If $a[15] = $a[27] And $a[27] = $a[26] Then MouseClick("primary", 519, 409, 1, 0)
	If $a[15] = $a[27] And $a[27] = $a[28] Then MouseClick("primary", 519, 409, 1, 0)
	If $a[16] = $a[15] And $a[15] = $a[17] Then MouseClick("primary", 479, 409, 1, 0)
	If $a[16] = $a[4] And $a[4] = $a[28] Then MouseClick("primary", 479, 409, 1, 0)
	If $a[16] = $a[15] And $a[15] = $a[3] Then MouseClick("primary", 479, 409, 1, 0)
	If $a[16] = $a[4] And $a[4] = $a[3] Then MouseClick("primary", 479, 409, 1, 0)
	If $a[16] = $a[17] And $a[17] = $a[5] Then MouseClick("primary", 479, 409, 1, 0)
	If $a[16] = $a[17] And $a[17] = $a[29] Then MouseClick("primary", 479, 409, 1, 0)
	If $a[16] = $a[15] And $a[15] = $a[27] Then MouseClick("primary", 479, 409, 1, 0)
	If $a[16] = $a[4] And $a[4] = $a[5] Then MouseClick("primary", 479, 409, 1, 0)
	If $a[16] = $a[28] And $a[28] = $a[27] Then MouseClick("primary", 479, 409, 1, 0)
	If $a[16] = $a[28] And $a[28] = $a[29] Then MouseClick("primary", 479, 409, 1, 0)
	If $a[17] = $a[16] And $a[16] = $a[18] Then MouseClick("primary", 439, 409, 1, 0)
	If $a[17] = $a[5] And $a[5] = $a[29] Then MouseClick("primary", 439, 409, 1, 0)
	If $a[17] = $a[18] And $a[18] = $a[6] Then MouseClick("primary", 439, 409, 1, 0)
	If $a[18] = $a[6] And $a[6] = $a[5] Then MouseClick("primary", 399, 409, 1, 0)
	If $a[18] = $a[6] And $a[6] = $a[7] Then MouseClick("primary", 399, 409, 1, 0)
	If $a[18] = $a[17] And $a[17] = $a[5] Then MouseClick("primary", 399, 409, 1, 0)
	If $a[18] = $a[17] And $a[17] = $a[29] Then MouseClick("primary", 399, 409, 1, 0)
	If $a[18] = $a[19] And $a[19] = $a[7] Then MouseClick("primary", 399, 409, 1, 0)
	If $a[18] = $a[19] And $a[19] = $a[31] Then MouseClick("primary", 399, 409, 1, 0)
	If $a[18] = $a[30] And $a[30] = $a[31] Then MouseClick("primary", 399, 409, 1, 0)
	If $a[18] = $a[30] And $a[30] = $a[29] Then MouseClick("primary", 399, 409, 1, 0)
	If $a[18] = $a[17] And $a[17] = $a[19] Then MouseClick("primary", 399, 409, 1, 0)
	If $a[18] = $a[6] And $a[6] = $a[30] Then MouseClick("primary", 399, 409, 1, 0)
	If $a[19] = $a[18] And $a[18] = $a[20] Then MouseClick("primary", 359, 409, 1, 0)
	If $a[19] = $a[7] And $a[7] = $a[31] Then MouseClick("primary", 359, 409, 1, 0)
	If $a[24] = $a[23] And $a[23] = $a[12] Then MouseClick("primary", 159, 409, 1, 0)
	If $a[24] = $a[36] And $a[36] = $a[23] Then MouseClick("primary", 159, 409, 1, 0)
	If $a[23] = $a[11] And $a[11] = $a[12] Then MouseClick("primary", 199, 409, 1, 0)
	If $a[23] = $a[11] And $a[11] = $a[10] Then MouseClick("primary", 199, 409, 1, 0)
	If $a[23] = $a[35] And $a[35] = $a[36] Then MouseClick("primary", 199, 409, 1, 0)
	If $a[23] = $a[35] And $a[35] = $a[34] Then MouseClick("primary", 199, 409, 1, 0)
	If $a[23] = $a[24] And $a[24] = $a[12] Then MouseClick("primary", 199, 409, 1, 0)
	If $a[23] = $a[24] And $a[24] = $a[36] Then MouseClick("primary", 199, 409, 1, 0)
	If $a[23] = $a[22] And $a[22] = $a[10] Then MouseClick("primary", 199, 409, 1, 0)
	If $a[23] = $a[22] And $a[22] = $a[34] Then MouseClick("primary", 199, 409, 1, 0)
	If $a[23] = $a[11] And $a[11] = $a[35] Then MouseClick("primary", 199, 409, 1, 0)
	If $a[23] = $a[24] And $a[24] = $a[22] Then MouseClick("primary", 199, 409, 1, 0)
	If $a[22] = $a[23] And $a[23] = $a[21] Then MouseClick("primary", 239, 409, 1, 0)
	If $a[22] = $a[10] And $a[10] = $a[34] Then MouseClick("primary", 239, 409, 1, 0)
	If $a[21] = $a[9] And $a[9] = $a[8] Then MouseClick("primary", 279, 409, 1, 0)
	If $a[21] = $a[9] And $a[9] = $a[10] Then MouseClick("primary", 279, 409, 1, 0)
	If $a[21] = $a[33] And $a[33] = $a[34] Then MouseClick("primary", 279, 409, 1, 0)
	If $a[21] = $a[33] And $a[33] = $a[32] Then MouseClick("primary", 279, 409, 1, 0)
	If $a[21] = $a[22] And $a[22] = $a[10] Then MouseClick("primary", 279, 409, 1, 0)
	If $a[21] = $a[22] And $a[22] = $a[34] Then MouseClick("primary", 279, 409, 1, 0)
	If $a[21] = $a[20] And $a[20] = $a[8] Then MouseClick("primary", 279, 409, 1, 0)
	If $a[21] = $a[20] And $a[20] = $a[32] Then MouseClick("primary", 279, 409, 1, 0)
	If $a[21] = $a[33] And $a[33] = $a[9] Then MouseClick("primary", 279, 409, 1, 0)
	If $a[21] = $a[22] And $a[22] = $a[20] Then MouseClick("primary", 279, 409, 1, 0)
	If $a[20] = $a[19] And $a[19] = $a[21] Then MouseClick("primary", 319, 409, 1, 0)
	If $a[20] = $a[8] And $a[8] = $a[7] Then MouseClick("primary", 319, 409, 1, 0)
	If $a[20] = $a[8] And $a[8] = $a[9] Then MouseClick("primary", 319, 409, 1, 0)
	If $a[20] = $a[19] And $a[19] = $a[7] Then MouseClick("primary", 319, 409, 1, 0)
	If $a[20] = $a[19] And $a[19] = $a[31] Then MouseClick("primary", 319, 409, 1, 0)
	If $a[20] = $a[32] And $a[32] = $a[33] Then MouseClick("primary", 319, 409, 1, 0)
	If $a[20] = $a[32] And $a[32] = $a[31] Then MouseClick("primary", 319, 409, 1, 0)
	If $a[20] = $a[21] And $a[21] = $a[9] Then MouseClick("primary", 319, 409, 1, 0)
	If $a[20] = $a[21] And $a[21] = $a[33] Then MouseClick("primary", 319, 409, 1, 0)
	If $a[20] = $a[8] And $a[8] = $a[32] Then MouseClick("primary", 319, 409, 1, 0)
EndFunc



Func TPause()
	$Paused = Not $Paused
	While $Paused
		Sleep(100)
		ToolTip('Script is "Paused"', 0, 0)
	WEnd
	ToolTip("")
EndFunc   ;==>TPause


Func vyx()
	_PixelGetColor_ReleaseDC($vDC,$hDll)
	DllClose($hDll)

	ToolTip("Good Buy", 0, 0)
	Sleep(3000)
	Exit
EndFunc   ;==>vyx

Скачай библиотеку _PixelGetColor.au3
 
Автор
M

mr.Gbabak

Осваивающий
Сообщения
257
Репутация
23
:ok:реально быстрее работает! Спасибо, осталось логику до ума довести...
А может есть способ сделать, "поиск в глубину"? Т.е чтоб бот сам отслеживал совпадения, жестко не прописывая логику? Или это уже совсем другая тема?
 
Автор
M

mr.Gbabak

Осваивающий
Сообщения
257
Репутация
23
Возможно оффтопик, но подскажите мне пожалуйста, где найти описание (гуглил, но видать плохо, не нашел :'():
Код:
_PixelGetColor_CreateDC
_PixelGetColor_CaptureRegion
_PixelGetColor_GetPixelRaw

т.е я примерно понял для чего они, но хотелось бы более тщательно понять как они работают и область, их дальнейшего применения.
 

Belfigor

Модератор
Локальный модератор
Сообщения
3,608
Репутация
941
А прочитать содержимое _PixelGetColor.au3 нэ? Там вроде всё подробно описано.
 
Автор
M

mr.Gbabak

Осваивающий
Сообщения
257
Репутация
23
А чего-то я не подумал...всю справку перерыл, а оно вон что оказалось :-[
Спасибо!!! :thanks:
 
Верх