1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
| Function quxiao(n, z) Form1.ProgressBar1.Value =0 For n i=i+1 Form1.ProgressBar1.Value = 100 * i / n //进度条 Delay 500 Call Plugin.Bkgnd.RightClick(WeChat, 415, 100)//第一个公众号的位置 Delay 500 CMenuWnd = Plugin.Window.Find("CMenuWnd", "CMenuWnd") Call Plugin.Bkgnd.LeftClick(CMenuWnd, 25, z) Delay 500 ConfirmDialog = Plugin.Window.Find("ConfirmDialog", "微信") Call Plugin.Bkgnd.LeftClick(ConfirmDialog, 222, 188) Delay 500 Next End Function Event Form1.Button1.Click Dim index,n,z,p,s index = Split(Form1.ComboBox1.List, "|") n = index(Form1.ComboBox1.ListIndex) MessageBox ("即将取消关注" + n + "个公众号") WeChat = Plugin.Window.Find("WeChatMainWndForPC", "微信") Delay 500 Call Plugin.Window.Max(WeChat) Delay 500 Plugin.Window.Show(WeChat) Delay 500 Call Plugin.Window.Max(WeChat) Delay 500 If Form1.OptionBox1.Value = 1 Then //公众号 z = 65 s="公众号" Call Plugin.Bkgnd.LeftClick(WeChat, 25, 140)//通讯录 Else z = 45 s="订阅号" Call Plugin.Bkgnd.LeftClick(WeChat, 25, 90)//聊天 End If XY = Plugin.Bkgnd.FindColor(WeChat, 0, 0, 1024, 310, "D6852F") ZB = InStr(XY, "|") X = Clng(Left(XY, ZB - 1)): Y = Clng(Right(XY, Len(XY) - ZB)) Delay 500 Call Plugin.Bkgnd.LeftClick(WeChat, X, Y) Call Plugin.Bkgnd.MoveTo(WeChat, X, Y) Delay 500 Plugin.Window.Restore (WeChat) Delay 500 Call Plugin.Window.Size(WeChat, 1024, 678) p=quxiao(n,z) MessageBox(n + "个"+s+"已经取消关注了") End Event Event Form1.Button2.Click Dim index,n,z,p,s index = Split(Form1.ComboBox1.List, "|") n = index(Form1.ComboBox1.ListIndex) MessageBox ("即将取消关注" + n + "个公众号") WeChat = Plugin.Window.Find("WeChatMainWndForPC", "微信") Delay 500 Call Plugin.Window.Max(WeChat) Delay 500 Plugin.Window.Show(WeChat) Delay 500 Call Plugin.Window.Max(WeChat) Delay 500 If Form1.OptionBox1.Value = 1 Then //公众号 z = 65 s="公众号" Call Plugin.Bkgnd.LeftClick(WeChat, 25, 140)//通讯录 Else z = 45 s="订阅号" Call Plugin.Bkgnd.LeftClick(WeChat, 25, 90)//聊天 End If
Delay 500 Call Plugin.Bkgnd.LeftClick(WeChat, X, Y) Call Plugin.Bkgnd.MoveTo(WeChat, X, Y) Delay 500 Plugin.Window.Restore (WeChat) Delay 500 Call Plugin.Window.Size(WeChat, 1024, 678) p=quxiao(n,z) MessageBox(n + "个"+s+"已经取消关注了") End Event
|