# coding=utf-8 """ @project: find wechat @Author:meetrice @date:2022/10/25 @blogs: https://www.cnblogs.com/meetrice/ """ import time import pyautogui as pg import pyperclip as pc def send_msg(): name = '好友名称' pg.hotkey('ctrl', 'alt', 'w') time.sleep(0.1) pg.hotkey('ctrl', 'f') time.sleep(0.1) pc.copy(name) pg.hotkey('ctrl', 'v') time.sleep(0.5) pg.press('enter') send_msg()