# -*- coding: utf-8 -*-
"""
@Time : 2022/5/25 上午 10:00
@Author : iFish
@File : automation_vx.py
"""

import time
import pyautogui as pg
import pyperclip as pc

pg.PAUSE = 1

VX = '꧁全家福꧂' #这是微信或者微信群的名字。

msg = '测试微信定时发送信息888'

send_time = '17:20:00'


def main():
# 启动微信
pg.hotkey('alt', 'd')
pg.hotkey('ctrl', 'f') #扫过微信指定的名字,微信名或者微信群名

pc.copy(VX)
pg.hotkey('ctrl', 'v')
pg.press('enter')

pc.copy(msg)
pg.hotkey('ctrl', 'v')
pg.press('enter')


if __name__ == '__main__':
while True:
hour = time.localtime()
now_time = time.strftime("%H:%M:%S", hour)
if now_time == send_time:
print("run")
main()
print("is ok")
break