直接在WeChat中增加一个函数
def at(self, name, msg, clear=True): ''' :param name: 需要@人的名字 :param msg: 要发送的信息 :param clear: ''' self.UiaAPI.SwitchToThisWindow() if clear: self.EditMsg.SendKeys('{Ctrl}a', waitTime=0) self.EditMsg.SendKeys('@{}'.format(name), waitTime=0) self.EditMsg.SendKeys('{Enter}', waitTime=0) self.EditMsg.SendKeys('{}'.format(msg)) self.EditMsg.SendKeys('{Enter}', waitTime=0)
标签:功能,self,param,waitTime,EditMsg,增加,wxauto,SendKeys,msg From: https://www.cnblogs.com/xujunhui/p/17647565.html