下面是用按键精灵实现微信群定时群发的程序,但是定时的功能暂时还没实现,只是可以群发,要先把要发送的内容复制到剪贴板,之后要手动把要发送的群窗口打开。
Hwnd = Plugin.Window.Find("ChatWnd", "魔道股道")
//MsgBox "查找到的父窗口句柄为:"& Hwnd
//下面这句是激活窗口
Call Plugin.Window.Active(Hwnd)
Delay 1000
//下面语句是把激活的窗口置前,模式:0=(置前),1=(取消置前)
Call Plugin.Window.Top(Hwnd, 0)
Delay 1000
KeyDown 17, 1
KeyPress 86, 1
KeyUp 17, 1
Delay 2000
KeyDown "Enter", 1
Delay 1000
//窗口取消置前
Call Plugin.Window.Top(Hwnd, 1)
Delay 1000
Hwnd = Plugin.Window.Find("ChatWnd", "魔道资料分享群")
Call Plugin.Window.Active(Hwnd)
Delay 1000
Call Plugin.Window.Top(Hwnd, 0)
Delay 1000
KeyDown 17, 1
KeyPress 86, 1
KeyUp 17, 1
Delay 1000
KeyDown "Enter", 1
Delay 1000
Call Plugin.Window.Top(Hwnd, 1)
MsgBox "群发成功!!!"