资源简介
这是C#开发的QQ机器人,能够使用任意版本的QQ。自带了谜语等。支持发送文件。图片。消息等
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Windows.Automation;
using System.Text.Regularexpressions;
using System.Threading;
using System.Net;
using System.IO;
using PubOp;
using System.Collections.Specialized;
using System.Diagnostics;
namespace QQRoboter
{
public partial class Form1 : Form
{
string Md = ““;
int p = 0;
int hour = 0;
int shijian = 120;
string value = ““;
bool iscai = false;//是否在猜拳中
bool iscaimi = false;
[System.Runtime.InteropServices.DllImport(“user32.dll“ EntryPoint = “FindWindow“)]
public static extern IntPtr FindWindow(string lpClassName string lpWindowName);
//把窗口放到最前面
const int WM_SETTEXT = 0x000C;//写字符串
[DllImport(“User32.dll“ EntryPoint = “SendMessage“)]
private static extern int SendMessageW(IntPtr hWnd int Msg IntPtr wParam string lParam);
[DllImport(“USER32.DLL“)]
public static extern bool SetForegroundWindow(IntPtr hWnd); //模拟键盘事件
[DllImport(“User32.dll“)]
public static extern void keybd_event(Byte bVk Byte bScan Int32 dwFlags Int32 dwExtraInfo);
[DllImport(“user32.dll“)]
private static extern bool SetCursorPos(int X int Y);
//释放按键的常量
private const int KEYEVENTF_KEYUP = 2;
const int WM_PASTE = 0x302;
const int WM_CUT = 0x300;
const int WM_COPY = 0x301;
//发送消息
[DllImport(“user32.dll“)]
private static extern int SendMessage(IntPtr hWnd int Msg int wParam int lParam);
[DllImport(“user32.dll“)]//获取窗口大小
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool GetWindowRect(IntPtr hWnd ref RECT lpRect);
[StructLayout(LayoutKind.Sequential)]//获取窗口坐标
public struct RECT
{
public int Left; //最左坐标
public int Top; //最上坐标
public int Right; //最右坐标
public int Bottom; //最下坐标
}
[DllImport(“user32.dll“)]
private static extern bool ShowWindow(IntPtr hWnd int nCmdShow);
#region SendMessage 参数
private const int WM_KEYDOWN = 0X100;
private const int WM_KEYUP = 0X101;
private const int WM_SYSCHAR = 0X106;
private const int WM_SYSKEYUP = 0X105;
private const int WM_SYSKEYDOWN = 0X104;
private const int WM_CHAR = 0X102;
#endregion
//鼠标事件
long period = 0;
[DllImport(“user32“)]
public static extern void mouse_event(int dwFlags int dx int dy int dwData int dwExtraInfo);
public Form1()
{
InitializeComponent();
Control.CheckForI
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-12-09 23:09 QQRoboter\
文件 869 2017-12-02 22:40 QQRoboter.sln
文件 25600 2018-02-07 00:00 QQRoboter.suo
目录 0 2017-12-02 22:40 QQRoboter\bin\
目录 0 2018-02-06 23:48 QQRoboter\bin\Debug\
文件 173056 2018-02-06 23:52 QQRoboter\bin\Debug\QQRoboter.exe
文件 52736 2018-02-06 23:52 QQRoboter\bin\Debug\QQRoboter.pdb
文件 11600 2018-02-06 23:55 QQRoboter\bin\Debug\QQRoboter.vshost.exe
文件 331776 2017-12-08 18:18 QQRoboter\bin\Debug\user.mdb
文件 2354 2017-12-08 23:08 QQRoboter\bin\Debug\剪刀.png
文件 1879 2017-12-08 23:08 QQRoboter\bin\Debug\布.png
文件 1959 2017-12-08 23:09 QQRoboter\bin\Debug\石头.png
文件 163572 2017-12-09 18:03 QQRoboter\bin\Debug\谜语.txt
文件 30969 2018-02-06 23:52 QQRoboter\Form1.cs
文件 19659 2018-02-06 23:40 QQRoboter\Form1.Designer.cs
文件 118398 2018-02-06 23:40 QQRoboter\Form1.resx
文件 2221 2017-12-09 23:12 QQRoboter\INI.cs
文件 1991 2017-12-09 23:12 QQRoboter\INIhelper.cs
目录 0 2017-12-02 22:40 QQRoboter\obj\
目录 0 2017-12-02 22:40 QQRoboter\obj\x86\
目录 0 2018-02-06 23:52 QQRoboter\obj\x86\Debug\
文件 11100 2017-12-09 12:13 QQRoboter\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6780 2018-02-06 23:52 QQRoboter\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 778 2018-02-06 23:55 QQRoboter\obj\x86\Debug\QQRoboter.csproj.FileListAbsolute.txt
文件 975 2018-02-06 23:40 QQRoboter\obj\x86\Debug\QQRoboter.csproj.GenerateResource.Cache
文件 173056 2018-02-06 23:52 QQRoboter\obj\x86\Debug\QQRoboter.exe
文件 74999 2018-02-06 23:40 QQRoboter\obj\x86\Debug\QQRoboter.Form1.resources
文件 52736 2018-02-06 23:52 QQRoboter\obj\x86\Debug\QQRoboter.pdb
文件 180 2018-02-06 23:28 QQRoboter\obj\x86\Debug\QQRoboter.Properties.Resources.resources
目录 0 2017-12-02 22:40 QQRoboter\obj\x86\Debug\TempPE\
文件 67646 2017-12-09 17:14 QQRoboter\penguin_128px_1179073_easyicon.net.ico
............此处省略8个文件信息
评论
共有 条评论