赞
踩
前言
该机器人完全仿照人是如何操作的,进行简历搜索和自动打招呼。
1、首先进行几个关键位置的标定
1)简历的左上角
2)简历的”打招呼“按钮
3)聊天对话框的输入文字框的位置
4)关闭聊天对话框的按钮的位置
5)”下一个“按钮的位置
将上面5个位置定义为P1~P5
标定相关的代码:
pos1 = Point(0,0)
pos2 = Point(0,0)
pos3 = Point(0,0)
pos4 = Point(0,0)
pos5 = Point(0,0)
def get_key_pos():
last_time = time.time()
step = -1
print("标定开始...")
while 1<2:
t = time.time() - last_time
if t > 5:
last_time = time.time()
if step == -1:
print("请点击一次简历左上角的空白处,并保持不动")
step = 0
elif step == 0:
pos1.x,pos1.y = m.position()
print("请点击一次打招呼,并保持不动")
step = 1
elif step == 1:
pos2.x,pos2.y = m.position()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。