天猫 刷红包
来源:互联网 发布:ai软件使用教程 编辑:程序博客网 时间:2024/05/13 15:28
今天刚做的,很简单 直接看代码:我的电脑是1280*800的,不知道在别的电脑上有没问题
因为刷的时候会弹出各种原因的对话框,都是找到那个关闭按钮坐标,模拟点击关闭的
有兴趣自己耍耍,不要搞别的!
using System;using System.Runtime.InteropServices;using System.Windows;using System.Windows.Input;using System.Windows.Threading;namespace ControlMouseOver{ /// <summary> /// MainWindow.xaml 的交互逻辑 /// </summary> public partial class MainWindow : Window { [DllImport("user32.dll", CharSet = CharSet.Auto)] public static extern bool GetCursorPos(ref POINT pt); [DllImport("user32.dll")] public static extern int SetCursorPos(int x, int y); [DllImport("user32")] private static extern int mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo); const int MOUSEEVENTF_LEFTDOWN = 0x2; const int MOUSEEVENTF_LEFTUP = 0x4; const int MOUSEEVENTF_MIDDLEDOWN = 0x20; const int MOUSEEVENTF_MIDDLEUP = 0x40; const int MOUSEEVENTF_MOVE = 0x1; const int MOUSEEVENTF_ABSOLUTE = 0x8000; const int MOUSEEVENTF_RIGHTDOWN = 0x8; const int MOUSEEVENTF_RIGHTUP = 0x10; DispatcherTimer timer = new DispatcherTimer(); DispatcherTimer timer2 = new DispatcherTimer(); DispatcherTimer time3 = new DispatcherTimer(); public MainWindow() { InitializeComponent(); timer.Tick += timer_Tick; timer.Interval = new TimeSpan(0, 0, 0, 0, 1); timer2.Tick += timer2_Tick; timer2.Interval = new TimeSpan(0, 0, 0, 0, 1); time3.Interval = new TimeSpan(0, 0, 0, 3); time3.Tick += time3_Tick; } void time3_Tick(object sender, EventArgs e) { POINT p = new POINT(); p.x = 838; p.y = 361; SetCursorPos(p.x, p.y); mouse_event(MOUSEEVENTF_LEFTDOWN, p.x, p.y, 0, 0); mouse_event(MOUSEEVENTF_LEFTUP, p.x, p.y, 0, 0); } void timer2_Tick(object sender, EventArgs e) { POINT p = new POINT(); mouse_event(MOUSEEVENTF_MOVE, p.x + 20, p.y, 0, 0); temp += 10; if (temp == 210) { timer2.Stop(); timer.Start(); temp = 0; } } int temp = 0; void timer_Tick(object sender, System.EventArgs e) { POINT p = new POINT(); mouse_event(MOUSEEVENTF_MOVE, p.x - 20, p.y, 0, 0); temp += 10; if (temp == 210) { timer.Stop(); temp = 0; timer2.Start(); } } private void Button_Click(object sender, RoutedEventArgs e) { timer.Start(); time3.Start(); POINT p = new POINT(); p.x = 645; p.y = 311; SetCursorPos(p.x, p.y); mouse_event(MOUSEEVENTF_LEFTDOWN, p.x, p.y, 0, 0); mouse_event(MOUSEEVENTF_LEFTUP, p.x, p.y, 0, 0); } private void Window_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { if ( e.Key == Key.Escape) { Application.Current.Shutdown(); } } //private void Button_Click_1(object sender, RoutedEventArgs e) //{ // // POINT p = new POINT(); // // //p.x = 888; // // //p.y = 50; // //// SetCursorPos(p.x, p.y); // // GetCursorPos(ref p); // // //mouse_event(MOUSEEVENTF_LEFTDOWN, p.x, p.y, 0, 0); // // //mouse_event(MOUSEEVENTF_LEFTUP, p.x, p.y, 0, 0); // // MessageBox.Show(p.x.ToString() + " " + p.y.ToString()); //} } [StructLayout(LayoutKind.Sequential)] public struct POINT { public int x, y; }}
<script type="text/javascript"><!--google_ad_client = "ca-pub-1944176156128447";/* cnblogs 首页横幅 */google_ad_slot = "5419468456";google_ad_width = 728;google_ad_height = 90;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 天猫 刷红包
- 红包!!?
- 红包
- “红包”
- 红包!红包!
- 天猫11 自动 顶红包 VC 实现
- 红包快手-秒抢微信红包
- 使用代码刷QQ的跨年红包
- PHP防止多次请求刷红包的方法
- 红包博弈论
- 墨子红包
- 红包算法
- 红包来袭!!!
- 红包算法
- 红包算法
- 春节红包
- 红包算法
- 红包倒计时
- C++ 虚函数表解析
- Linux Socket编程(不限Linux)
- 几种上下文的区别
- 程序员版--致青春(二)——11平台dota胜负预判器
- Process Explorer中调出DLLs的窗口
- 天猫 刷红包
- 10个迷惑新手的Cocoa&Objective-c开发问题
- ObjectARX全部版本下载
- C++中的向上类型转换和向下类型转换
- mac 下 android 开发环境搭建 cocos2d-x
- 每天学习一点.net(5) 利用匿名方法Lambda表达式(=>)实现委托
- 常见数据库默认的端口号
- Oracle创建表空间、创建用户、授权、授权对象的访问以及查看权限集合
- javascript判断一个字符串中出现次数最多的字符,统计这个次数