<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Soul Of Free Loop &#187; QQ</title>
	<atom:link href="https://zohead.com/archives/tag/qq/feed/" rel="self" type="application/rss+xml" />
	<link>https://zohead.com</link>
	<description>Uranus Zhou&#039;s Blog</description>
	<lastBuildDate>Sat, 19 Jul 2025 15:42:46 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8</generator>
	<item>
		<title>使用AutoIt导出QQ群漫游聊天记录</title>
		<link>https://zohead.com/archives/autoit-export-qqmsg/</link>
		<comments>https://zohead.com/archives/autoit-export-qqmsg/#comments</comments>
		<pubDate>Tue, 08 Apr 2014 14:52:41 +0000</pubDate>
		<dc:creator><![CDATA[Uranus Zhou]]></dc:creator>
				<category><![CDATA[工具]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[AutoIt]]></category>
		<category><![CDATA[QQ]]></category>
		<category><![CDATA[脚本]]></category>

		<guid isPermaLink="false">http://zohead.com/?p=694</guid>
		<description><![CDATA[本文同步自（最佳显示效果请点击）：https://zohead.com/archives/autoit-export-qqmsg/ 近日需要将某个QQ群的聊天记录导出来查找需要的东西，但发现本地保存的聊天记录比较少，很多日志都在漫游的聊天记录里，QQ本身又没有提供直接导出漫游聊天记录的功能，因此就想到写一个 AutoIt 自动脚本来模拟鼠标和键盘动作自动导出日志了。 首先安装 AutoIt v3，然后打开需要导出的QQ群聊天窗口，点击 “消息记录” 按钮（消息会显示在右边窗口），然后切换到 “漫游消息” 标签；接着再开启一个空的 EditPlus 文档： 然后运行我写的这个简单的 copy_q [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>本文同步自（最佳显示效果请点击）：<a href="https://zohead.com/archives/autoit-export-qqmsg/" target="_blank">https://zohead.com/archives/autoit-export-qqmsg/</a></p>
<p>近日需要将某个QQ群的聊天记录导出来查找需要的东西，但发现本地保存的聊天记录比较少，很多日志都在漫游的聊天记录里，QQ本身又没有提供直接导出漫游聊天记录的功能，因此就想到写一个 AutoIt 自动脚本来模拟鼠标和键盘动作自动导出日志了。</p>
<p>首先安装 AutoIt v3，然后打开需要导出的QQ群聊天窗口，点击 “消息记录” 按钮（消息会显示在右边窗口），然后切换到 “漫游消息” 标签；接着再开启一个空的 EditPlus 文档：</p>
<div style="width: 650px" class="wp-caption alignnone"><a href="http://zohead.com/wp-content/uploads/qq-remote-msg.jpg" target="_blank"><img alt="QQ群漫游聊天记录" src="http://zohead.com/wp-content/uploads/qq-remote-msg.jpg" width="640" height="437" /></a><p class="wp-caption-text">QQ群漫游聊天记录</p></div>
<p>然后运行我写的这个简单的 <strong>copy_qqmsg.au3</strong> AutoIt 脚本就可以自动将漫游聊天记录复制到 EditPlus 中了，运行之前请先将第一行的 qqgroup 换成实际的QQ群或者聊天窗口的名字。</p>
<p>AutoIt 脚本内容其实非常简陋的，没有什么难度，内容如下：</p>
<pre class="brush: bash; highlight: [5,14]; title: copy_qqmsg.au3; notranslate">
Local $hWnd = WinGetHandle(&quot;[CLASS:TXGuiFoundation; TITLE:qqgroup]&quot;, &quot;&quot;)
Local $editWnd = WinGetHandle(&quot;EditPlus&quot;, &quot;&quot;)

$i=1
While $i&lt;=200
	WinActivate($hWnd)
	Local $aPos = WinGetPos(&quot;[ACTIVE]&quot;)
	MouseClick(&quot;left&quot;, $aPos[0] + $aPos[2] - 52, $aPos[1] + $aPos[3] - 18)
	Sleep(100)
	$i=$i+1
WEnd

$i=1
While $i&lt;=100
	WinActivate($hWnd)
	Local $aPos = WinGetPos(&quot;[ACTIVE]&quot;)
	MouseClick(&quot;left&quot;, $aPos[0] + $aPos[2] - 52, $aPos[1] + $aPos[3] - 18)
	Sleep(5000)
	Send(&quot;^a&quot;)
	Send(&quot;^c&quot;)
	WinActivate($editWnd)
	Sleep(500)
	Send(&quot;^v&quot;)
	Send(&quot;{ENTER}&quot;)
	Sleep(500)
	$i=$i+1
WEnd
</pre>
<p>先根据QQ聊天窗口类名（TXGuiFoundation）和标题名称（根据实际需要修改）查找到QQ聊天窗口句柄，再查找到 EditPlus 窗口句柄，接着将鼠标移动到QQ聊天窗口右下角的 “&lt;” 上一页按钮上自动点击并发送全选及复制按键，然后切换到 EditPlus 窗口中进行粘贴。程序运行过程中鼠标和键盘不要乱按哦。</p>
<p>第一个循环中的 200 表示当前页再往前翻多少页，第二个循环中的 100 表示自动拷贝多少页的聊天记录（方式比较土，没什么好办法判断什么时候结束）。鼠标点击之后的 Sleep 5秒钟是为了给QQ显示漫游聊天记录的时间。</p>
<p>需要的朋友可以到我的 Gist 上下载此 AutoIt 脚本，可以自己下载之后用 AutoIt 编译成可执行程序的：</p>
<p><a href="http://gist.github.com/zohead/10130455" target="_blank">http://gist.github.com/zohead/10130455</a></p>
<p>有任何问题的话欢迎交流哦~~~</p>
]]></content:encoded>
			<wfw:commentRss>https://zohead.com/archives/autoit-export-qqmsg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
