每次输入都避让
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"index": 1681
|
"index": 3185
|
||||||
}
|
}
|
10
touch2.py
10
touch2.py
@@ -110,7 +110,7 @@ class ser(object):
|
|||||||
self.x=x
|
self.x=x
|
||||||
self.y=y
|
self.y=y
|
||||||
def touch(self):
|
def touch(self):
|
||||||
self.write(f"Z6\r")
|
self.write(f"Z4\r")
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
self.write(f"Z0\r")
|
self.write(f"Z0\r")
|
||||||
time.sleep(0.05)
|
time.sleep(0.05)
|
||||||
@@ -142,9 +142,7 @@ class ser(object):
|
|||||||
myprint(f"点击 index={index},{p[index]}")
|
myprint(f"点击 index={index},{p[index]}")
|
||||||
self.togo(pos[0],pos[1])
|
self.togo(pos[0],pos[1])
|
||||||
self.touch()
|
self.touch()
|
||||||
if p[index] not in "890":
|
self.avoid()
|
||||||
# 890 不需要避让
|
|
||||||
self.avoid()
|
|
||||||
if(find_text(identify_text(),"手机已锁定")):
|
if(find_text(identify_text(),"手机已锁定")):
|
||||||
if(index==5):
|
if(index==5):
|
||||||
myprint(f"手机锁定中,已全部输入")
|
myprint(f"手机锁定中,已全部输入")
|
||||||
@@ -170,7 +168,7 @@ def data_get()->dict:
|
|||||||
return {"index":0}
|
return {"index":0}
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main1__":
|
if __name__ == "__main__":
|
||||||
s=ser()
|
s=ser()
|
||||||
s.open("com8")
|
s.open("com8")
|
||||||
password=data_get().get("index",0)
|
password=data_get().get("index",0)
|
||||||
@@ -219,7 +217,7 @@ if __name__ == "__main1__":
|
|||||||
s.close()
|
s.close()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main1__":
|
||||||
# identify_text()
|
# identify_text()
|
||||||
# get_scr(_ocr_pos[0],_ocr_pos[1],_ocr_pos[2],_ocr_pos[3],f"test")
|
# get_scr(_ocr_pos[0],_ocr_pos[1],_ocr_pos[2],_ocr_pos[3],f"test")
|
||||||
# find_input_count()
|
# find_input_count()
|
||||||
|
Reference in New Issue
Block a user