資源簡(jiǎn)介
C#利用UI Automation獲取TIMQQ任意聊天信息 利用postmessage發(fā)送指定信息
https://blog.csdn.net/qq_33947955/article/details/103942866
https://blog.csdn.net/qq_33947955/article/details/103942866

代碼片段和文件信息
using?QQManager;
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Threading;
using?System.Threading.Tasks;
using?System.Windows.Forms;
namespace?WindowsFormsApp58
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????List?oldmessage?=?new?List();
????????????int?周期刷新時(shí)間?=?500;
????????????QQmsg.QQMsgService(true?周期刷新時(shí)間);
????????????//持續(xù)接收信息
????????????new?Thread(()?=>
????????????{
????????????????while?(true)
????????????????{
????????????????????Thread.Sleep(周期刷新時(shí)間?/?2);
????????????????????bool?onefind?=?false;
????????????????????string?lockermessage?=?QQmsg.LastMessage;
????????????????????foreach?(var?quickget?in?oldmessage)
????????????????????{
????????????????????????if?(quickget?==?lockermessage)
????????????????????????{
????????????????????????????onefind?=?true;
????????????????????????}
????????????????????????else
????????????????????????if?(lockermessage.Replace(“?“?““)?==?““)
????????????????????????{
????????????????????????????onefind?=?true;
????????????????????????}
????????????????????}
????????????????????if?(!onefind)?{
????????????????????????label2.Invoke(new?Action(()?=>?{?label2.Text?=?lockermessage.Replace(“\r“?““).Replace(“?“?““).Replace(“\r\n“?““);?}));
????????????????????????oldmessage.Add(lockermessage);
????????????????????}
???????????????????
????????????????????
????????????????}
????????????}).Start();
????????????//QQmsg.ReloadQQform();
????????????//List?getmsg?=?QQmsg.ReloadQQMessage(“上古卷軸5研究群“);
????????????//foreach?(var?lv1get?in?getmsg)
????????????//{
????????????//????MessageBox.Show(lv1get.allmessage[0].RichMessage);
????????????//}
????????????//?QQmsg.SendQQMsg(“上古卷軸5研究群““測(cè)試“);
????????}
????????private?void?label2_Click(object?sender?EventArgs?e)
????????{
????????}
????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
?????????
????????}
????}
}
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????目錄???????????0??2020-01-12?04:56??WindowsFormsApp58\
?????目錄???????????0??2020-01-12?04:58??WindowsFormsApp58\.git\
?????文件????????2581??2020-01-12?04:56??WindowsFormsApp58\.gitattributes
?????文件????????4565??2020-01-12?04:56??WindowsFormsApp58\.gitignore
?????文件??????????40??2020-01-12?04:56??WindowsFormsApp58\.git\COMMIT_EDITMSG
?????文件?????????772??2020-01-12?04:56??WindowsFormsApp58\.git\config
?????文件??????????73??2020-01-12?04:56??WindowsFormsApp58\.git\desc
?????文件??????????23??2020-01-12?04:56??WindowsFormsApp58\.git\HEAD
?????目錄???????????0??2020-01-12?04:56??WindowsFormsApp58\.git\hooks\
?????文件?????????478??2020-01-12?04:56??WindowsFormsApp58\.git\hooks\applypatch-msg.sample
?????文件?????????896??2020-01-12?04:56??WindowsFormsApp58\.git\hooks\commit-msg.sample
?????文件?????????189??2020-01-12?04:56??WindowsFormsApp58\.git\hooks\post-update.sample
?????文件?????????424??2020-01-12?04:56??WindowsFormsApp58\.git\hooks\pre-applypatch.sample
?????文件????????1642??2020-01-12?04:56??WindowsFormsApp58\.git\hooks\pre-commit.sample
?????文件????????1348??2020-01-12?04:56??WindowsFormsApp58\.git\hooks\pre-push.sample
?????文件????????4898??2020-01-12?04:56??WindowsFormsApp58\.git\hooks\pre-reba
?????文件?????????544??2020-01-12?04:56??WindowsFormsApp58\.git\hooks\pre-receive.sample
?????文件????????1239??2020-01-12?04:56??WindowsFormsApp58\.git\hooks\prepare-commit-msg.sample
?????文件????????3610??2020-01-12?04:56??WindowsFormsApp58\.git\hooks\update.sample
?????文件?????????245??2020-01-12?04:58??WindowsFormsApp58\.git\index
?????目錄???????????0??2020-01-12?04:56??WindowsFormsApp58\.git\info\
?????文件?????????240??2020-01-12?04:56??WindowsFormsApp58\.git\info\exclude
?????目錄???????????0??2020-01-12?04:56??WindowsFormsApp58\.git\logs\
?????文件?????????201??2020-01-12?04:56??WindowsFormsApp58\.git\logs\HEAD
?????目錄???????????0??2020-01-12?04:56??WindowsFormsApp58\.git\logs\refs\
?????目錄???????????0??2020-01-12?04:56??WindowsFormsApp58\.git\logs\refs\heads\
?????文件?????????201??2020-01-12?04:56??WindowsFormsApp58\.git\logs\refs\heads\master
?????文件?????????150??2020-01-12?04:57??WindowsFormsApp58\.git\ms-persist.xm
?????目錄???????????0??2020-01-12?04:56??WindowsFormsApp58\.git\ob
?????目錄???????????0??2020-01-12?04:56??WindowsFormsApp58\.git\ob
?????文件?????????164??2020-01-12?04:56??WindowsFormsApp58\.git\ob
............此處省略111個(gè)文件信息
評(píng)論
共有 條評(píng)論