• 大小: 587KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-05-28
  • 语言: C#
  • 标签: C#  

资源简介

C#利用UI Automation获取TIMQQ任意聊天信息 利用postmessage发送指定信息
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 周期刷新时间 = 500;
            QQmsg.QQMsgService(true 周期刷新时间);
            //持续接收信息
            new Thread(() =>
            {
                while (true)
                {
                    Thread.Sleep(周期刷新时间 / 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研究群““测试“);

        }

        private void label2_Click(object sender EventArgs e)
        {

        }

        private void button1_Click(object sender EventArgs e)
        {

         
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           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\description
     文件          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-rebase.sample
     文件         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.xml
     目录           0  2020-01-12 04:56  WindowsFormsApp58\.git\objects\
     目录           0  2020-01-12 04:56  WindowsFormsApp58\.git\objects\15\
     文件         164  2020-01-12 04:56  WindowsFormsApp58\.git\objects\15\5222e3c8476a515032f82815aad38c69bceb5f
............此处省略111个文件信息

评论

共有 条评论