itchat 不能使用,
请问各位大神,怎么可以实现python调用微信PC端实现发消息给微信群
from pynput.keyboard import Key,Controller
import time
keyboard = Controller()
a = input("请输入消息内容:")
b = eval(input('请输入次数:'))
print("请将光标移到对话框")
time.sleep(2)
for i in range(3):
print(r'还有%d秒'%(3-i))
time.sleep(1)
for i in range(b):
# 输入消息内容
keyboard.type(a)
# 模拟回车键
keyboard.press(Key.enter)
keyboard.release(Key.enter)
# 等待0.1秒
time.sleep(0.1)