用python快速定位微信好友,使用pyautogui 与电脑微信

# 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()

  

 
posted @ 2022-10-25 11:08  meetrice  阅读(81)  评论(1编辑  收藏  举报