风行者
发表于 2010-6-16 17:34:53
正则的学习一下
l100593120
发表于 2010-6-16 18:23:33
{:face (88):}好东西要标记一下!~ 再膜拜一下!~!~!~
jycel
发表于 2010-6-16 23:54:51
再次改了下对无昵称的用户
写成配置文件部份可根据自己所需修改循环读或直接读最终Date值都可以#include <GUIToolbar.au3>
#NoTrayIcon
$g_szVersion = "jianshechengxu"
If WinExists($g_szVersion) Then
;MsgBox(16, "温馨提示", "程序已运行",3)
Exit
EndIf
AutoItWinSetTitle($g_szVersion)
Dim $qqini=@ScriptDir&"\Temp.ini"
If FileExists($qqini) Then FileDelete($qqini)
If Not ProcessExists("qq.exe") Then
IniWrite($qqini,"Temp","Number","0")
IniWrite($qqini,"Temp","date","查询失败")
Exit
EndIf
QQInfo()
$var=IniReadSectionNames($qqini)
IniWrite($qqini,"Temp","Number",$var)
If $var=1 Then
$fg=StringSplit(IniRead($qqini,"1","1",""),"<~!@#$>",1)
If $fg="" Then
IniWrite($qqini,"1","1",$fg&"<~!@#$>空昵称")
EndIf
Else
For $i=1 To $var
$fg=StringSplit(IniRead($qqini,$var[$i],$var[$i],""),"<~!@#$>",1)
If $fg="" Then
IniWrite($qqini,$var[$i],$var[$i],$fg&"<~!@#$>空昵称")
EndIf
Next
EndIf
;#cs
For $i=1 To $var
$j = IniRead($qqini, "Temp","date","")
If $i = 1 Then IniWrite($qqini, "Temp","date", IniRead($qqini,$var[$i],$var[$i],""))
If $i > 1 Then IniWrite($qqini, "Temp","date", $j & "[~!@#$]" &IniRead($qqini,$var[$i],$var[$i],""))
Next
For $d =$var To 1 Step -1
IniDelete($qqini,$var[$d])
Next
;#ce
Func QQInfo()
Local $info, $sR, $i, $i_C, $txt
Local $hTb = ControlGetHandle('', '', 'ToolbarWindow321')
For $i = 0 To _GUICtrlToolbar_ButtonCount($hTb) - 1
$i_C = _GUICtrlToolbar_IndexToCommand($hTb, $i)
$txt = _GUICtrlToolbar_GetButtonText($hTb, $i_C)
$sR = StringRegExp($txt, '^QQ\:\h(.+)\((\d{5,}|.+@.+)\)', 3)
If Not @error Then
$info += 1
ReDim $info[$info + 1]
$info[$info] = $sR
$info[$info] = $sR
IniWrite($qqini,$info,$info,$sR&"<~!@#$>"&$sR)
EndIf
Next
Return $info
EndFunc ;==>QQInfo
t87564833
发表于 2010-7-4 18:13:19
先留个位置,回家再详细测试。{:face (317):}
lxz
发表于 2010-7-5 06:30:57
学习一下...