6
« on: January 08, 2015, 03:36:39 AM »
Вот сделал по вашему совету, вроде все норм, но иногда тупит. Можете глянуть и оптимизировать при возможности?!
thread(t2)
$va = 0
WHILE($va = 0)
GETSCREEN
IF(PXL(45,639) = 12575208)
WAITMS(100)
ELSE
$va = 1
END_IF
END_CYC
LCLICK(216,108)
WAITMS(2000)
end_thread
thread(t1)
SETTHREAD (t2, 1)
SETTHREAD (t3, 1)
$rnd_x = RND(36,286)
$rnd_y = RND(682,808)
LCLICK($rnd_x,$rnd_y)
WAITMS(100)
MOVE(565,518)
WAITMS(100)
$time = $_time_t + 10 // 10 секунд
WHILE($time > $_time_t)
GETSCREEN
IF_PIXEL_IN(37,682, 288,835, 255)
$time = 0
LCLICK($_return1, $_return2)
MOVE(565,518)
WAITMS(1000)
LCLICK($_return1, $_return2)
MOVE(565,518)
ELSE
END_IF
WAITMS(100)
END_CYC
WAITMS(100)
$ch = 0
WHILE($ch = 0)
GETSCREEN
IF_PIXEL_IN(0,86, 1437,855, 8628618)
KEYUP(#Ctrl)
LCLICK($_return1, $_return2)
WAITMS(300)
KEYUP(#Ctrl)
$time = $_time_t + 10 // 10 секунд
WHILE($time > $_time_t)
WAITMS(300)
GETSCREEN
IF_PIXEL_IN(0,86, 1437,855,728280,529105,2304698)
WAITMS(100)
KEYDOWN(#Ctrl)
WAITMS(300)
ELSE
$time = 0
END_IF
END_CYC
WAITMS(100)
KEYUP(#Ctrl)
WAITMS(100)
ELSE
$ch = 1
END_IF
END_CYC
$cha = 0
WHILE($cha = 0)
GETSCREEN
IF_PIXEL_IN(0,86, 1437,855, 5938406)
KEYUP(#Ctrl)
LCLICK($_return1, $_return2)
WAITMS(300)
KEYUP(#Ctrl)
$time = $_time_t + 19 // 10 секунд
WHILE($time > $_time_t)
WAITMS(300)
GETSCREEN
IF_PIXEL_IN(0,86, 1437,855,728280,529105,2304698)
WAITMS(500)
KEYDOWN(#Ctrl)
WAITMS(300)
ELSE
$time = 0
END_IF
WAITMS(100)
END_CYC
WAITMS(100)
KEYUP(#Ctrl)
WAITMS(100)
ELSE
$cha = 1
END_IF
END_CYC
end_thread
$var = 0
WHILE($var = 0)
GETSCREEN
IF(PXL(1272,162) = 9363348)
ELSE
$var = 1
END_IF
END_CYC
SETTHREAD (t1, 0)
WAITMS(100)
LCLICK(160,701) // 16759296
WAITMS(500)
LCLICK(162,702) // 0
WAITMS(100)
KEYPRESS(#c)
WAITMS(100)
KEYPRESS(#3)
WAITMS(100)
$time = $_time_t + 10 // 10 секунд
WHILE($time > $_time_t)
GETSCREEN
IF(PXL(648,671) = 1066273)
$time = 0
WAITMS(100)
LCLICK(648,671) //
WAITMS(100)
ELSE
END_IF
WAITMS(100)
END_CYC
WAITMS(100)
$time = $_time_t + 10 // 10 секунд
WHILE($time > $_time_t)
GETSCREEN
IF(PXL(666,477) = 6143)
$time = 0
WAITMS(100)
LCLICK(620,526) // 6316901
WAITMS(100)
ELSE
END_IF
WAITMS(100)
END_CYC
WAITMS(100)
$time = $_time_t + 10 // 10 секунд
WHILE($time > $_time_t)
GETSCREEN
IF(PXL(700,296) = 188)
$time = 0
WAITMS(100)
LCLICK(636,671)
WAITMS(100)
ELSE
END_IF
WAITMS(100)
END_CYC
WAIT(110)
WAITMS(100)
KEYPRESS(#c)
WAITMS(100)
KEYPRESS(#4)
WAITMS(10000)
SETTHREAD (t1, 1)