-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
40 lines (37 loc) · 1012 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import os
import json
import time
import re
import pyadb
import r1999path
import api
while True:
result = api.crop_match_template('img/NO1xCCO.png', 0, 186, 1280, 70)
if result is None:
#意志解析不在第一个
#打尘埃运动
while True:
result = api.crop_match_template('img/LP1xL2P.png', 0, 186, 1280, 70)
if result is not None:
api.touch(result[0], result[1])
time.sleep(0.5)
break
else:
api.swipe(600,500,200,200)
time.sleep(0.5)
break
else:
text = api.corp_ocr(result[0]+130, 500, 70, 35)
number = int(''.join(re.findall(r'\d+', text)))
print(number)
api.touch(result[0], result[1])
time.sleep(1)
break
while True:
result = r1999path.find_episode(5)
if result:
api.touch(result[0],result[1])
time.sleep(1)
break
else:
api.swipe(417,1290,625,625)