Global $Paused
HotKeySet("{F4}", "_Pause")
HotKeySet("{F10}","Stop")
$a="1"
$b="2"
$h = ("Арена - Хром")
Func stop()
Exit
EndFunc
Func _Pause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Отдыхаем!',0,0)
WEnd
EndFunc
While 1
WinActivate($h,"")
Sleep(Random(1000, 3000))
WinSetState($h,"",@SW_MAXIMIZE)
TrayTip("Внимание!","Работаем",1000)
$hWin = WinGetHandle('Окно')
$iX = 114
$iY = 988
$iColor = 0x0000FF
If PixelGetColor($iX, $iY, $hWin) == $iColor Then
ExitLoop
Else
MouseClick("left",21,970)
EndIf
;...если есть
MouseClick("left", 164,977) ; клик в строку чата,подругому не получается
Sleep(Random(1000, 2000))
send($b)
ControlSend($h, "", "", "{Enter}") ;Отправка сообщ
$iX = 82
$iY = 974
$iColor = 0x0000FF
If PixelGetColor($iX, $iY, $hWin) == $iColor Then
MouseClick("left",21,970)
EndIf
;...если есть
Sleep(Random(1000, 2000))
$hWin_1 = WinGetHandle('Apeha - Хром')
$iX_1 = 82
$iY_1 = 974
$iColor_1 = 0x0000FF
If PixelGetColor($iX_1, $iY_1, $hWin_1) <> $iColor_1 Then
MouseClick("left",21,970)
EndIf
Sleep(Random(1000, 2000))
send($a)
ControlSend($h, "", "", "{Enter}")
MouseClick("left", 342, 136) ;Клик на кнопку с перемещ в комнату
Sleep(Random(1000, 2000))
MouseClick("left", 356,167) ;;Клик на кнопку с перемещ в комнату
Sleep(Random(1000, 2000))
MouseClick("left", 164,977)
send($a)
ControlSend($h, "", "", "{Enter}")
Sleep(Random(1500, 2000))
MouseClick("left", 319,119)
Sleep(Random(1000, 2000))
MouseClick("left", 504,131)
Sleep(Random(1000, 2000))
MouseClick("left", 778,387)
Sleep(Random(1000, 2000))
MouseClick("left", 164,977)
Sleep(Random(1000, 2000))
send($b)
ControlSend($h, "", "", "{Enter}")
Sleep(Random(1000, 2000))
MouseClick("left", 318,113)
Sleep(Random(1000, 2000))
MouseClick("left", 507,224)
Sleep(Random(1000, 2000))
MouseClick("left", 794,509)
Sleep(Random(1000, 5000))
MouseClick("left", 791,503)
Sleep(Random(1000, 2000))
MouseClick("left", 164,977)
Sleep(Random(1000, 2000))
send($b)
ControlSend($h, "", "", "{Enter}")
MouseClick("left", 339,119)
Sleep(Random(1000, 2000))
MouseClick("left", 339,119)
Sleep(Random(1000, 2000))
MouseClick("left", 354,130)
_Sleep(15000) ;
MsgBox(0,"Пауза...","Время вышло :)")
_Sleep($iSec,$iX=10,$iY=10)
Local $hTimer = TimerInit(), $iTimer = 0
Do
$iTimer = Round(TimerDiff($hTimer)/1000,0)
ToolTip("Прошло "&$iTimer&" из "&$iSec&" секунд...",$iX,$iY,"Пауза...")
Sleep(250)
Until $iTimer >= $iSec
ToolTip("")
WEnd