資源簡介
這是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個文件信息
評論
共有 條評論