Доброго дня форумчане.
Помогите пожалуйста, уже 2 час сижу, не понимаю где косяк. В общем первый цикл FOR ( $gild_select_step_down = 0 , $gild_select_step_down < 12 )
Работает нормально, но если внутри цикла выполняется это условие IF_PICTURE_IN (0,0, $_xmax,$_ymax, "screens\temp\arm_club_1.bmp", -1, 100)
, то цикл начинает свой путь после этого условия.
Где подвох кроется?
GETSCREEN
IF_PICTURE_IN ( $Xmin , $Ymin , $Xmax , $Ymax , "screens\temp\gild_enter.bmp", -1, 100)
waitms ($t1)
again1:
$gild_select_temp = 0
again:
$Xgild_select = $Xmin + 360
$Ygild_select = $Ymin + 260
$Xgild_select_step_right1 = 348
$Xgild_select_step_right2 = 5
$Ygild_select_step_down = 24
$Xgild_nextlist = $Xmin + 713
$Ygild_nextlist = $Ymin + 560
FOR ( $gild_select_step_down = 0 , $gild_select_step_down < 12 )
print ("t0")
WAIT ( 1 )
LDOWN( $Xgild_select , $Ygild_select )
LUP( ($Xgild_select + $Xgild_select_step_right1 ) , $Ygild_select )
KEYDOWN (#CTRL)
WAITMS ($t0)
KEYDOWN (#C)
WAITMS ($t0)
KEYUP (#C)
KEYUP (#CTRL)
WAITMS( $t1 )
$gild_temp = FROMCLIP ()
WAITMS( $t2 )
LCLICK( $Xgild_select + $Xgild_select_step_right2 , $Ygild_select )
WAIT ($t8)
scan_gild_again:
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "screens\temp\arm_club_0.bmp", -1, 100)
WAIT ( $t7 )
LCLICK($_return1, $_return2)
else
GOTO (scan_gild_again)
END_IF
WAIT ( $t7 )
scan_arm_again:
print ("t1-1")
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "screens\temp\arm_club_1.bmp", -1, 100)
WAITms ( $t3 )
print ("ôàí çàãðóçèëñÿ")
$Xpodarok = $Xmin
next_arm:
for ( $podarok = 0 , $podarok < 6 )
GETSCREEN // íàõîäèì ôàíàòîê íà ïîäàðêè
IF_PICTURE_IN ( $Xpodarok , $Ymin , $Xmax , $Ymax , "screens\temp\podarok.bmp", -1, 100)
move($_return1, $_return2)
$Xpodarok = $_return1 + 10
waitms (600)
//ñìîòðèì íà ðèíã?
for ( $rang = 1 , $rang < 10 )
GETSCREEN // ñìîòðèì ïîäàðêè
IF_PICTURE_IN ( $Xmin , $Ymin + 300 , $Xmax , $Ymin + 396 , strconcat("screens\temp\rang\", $rang ,".bmp"), -1, 100)
if ( $rang = 9) // åñëè ôîíàòêà íà ðèíã, à åå íåò â áàçå - äîáàâëÿåì
SCREENSHOTEX ( $_return1 - 70 , $_return2 - 5 , $_return1 + 30 , $_return2 + 18, "temp\rang\9_" , 0 )
$_return1 $_return2
print ("íàéäåíà ôàíàòêà íà ðèíã, íî íåò â áàçå - ñêðèí ñäåëàë")
else
print ("ðèíã " , $rang , " " , $gild_temp)
GOTO (next_arm)
END_IF
END_IF
END_CYC
END_IF
END_CYC
else
GOTO (scan_arm_again)
END_IF
WAITms ( $t3 )
print ("t1-2")
print ("âûõîäèì èç ãðóïïû ", $gild_temp)
waitms ($t0)
GETSCREEN //âûõîäèì èç ãðóïïû
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "screens\temp\XYmin.bmp", -1, 100)
LCLICK($_return1, $_return2)
END_IF
print ("t2")
WAIT ( $t6 )
//ïåðåõîäèì ê ñëåäóþùåé ãðóïïå
IF ( $gild_select_step_down = 11 ) // Êîãäà 12 ãðóïï ïåðåáðàëè, ïðîêðó÷èâàåì ñïèñîê ãðóïï íèæå /11
print ("t3")
IF ( $gild_select_temp = 3 )
print ("ñíîâà")
FROMCLIP () = " "
LCLICK( $Xgild_nextlist , $Ygild_nextlist ) // Çàãðóæàåì ñëåäóþùèé ñïèñîê ãðóïï
$gild_select_temp = 0
wait ( $t7 )
GOTO ( again )
END_IF
print ("123")
$Xgild_roll_down = 719 // $Xmin + $Xgild_roll_down // ëèñòàòü ñïèñîê ãðóïï íèæå ïî Õ
$Ygild_roll_down = 529 // $Ymin + $Ygild_roll_down // ëèñòàòü ñïèñîê ãðóïï íèæå ïî Y
FOR ( $gild_roll_down = 0 , $gild_roll_down < 12 )
LCLICK ( $Xmin + $Xgild_roll_down , $Ymin + $Ygild_roll_down )
print ( $gild_roll_down )
END_CYC // Êîãäà 12 ãðóïï ïåðåáðàëè, ïðîêðó÷èâàåì ñïèñîê ãðóïï íèæå //
$gild_select_temp = $gild_select_temp + 1
FROMCLIP () = " "
wait ( $t7 )
GOTO ( again )
END_IF
print ("t4")
print ($gild_select_step_down)
print ("$gild_select_temp ", $gild_select_temp)
$Ygild_select = $Ygild_select + $Ygild_select_step_down
waitms ($t0)
print ("t5")
end_cyc // Øàã â íèç ê ñëåäóþùåé ãðóïïå //
END_IF