改了一点.#include <GUIToolbar.au3>
$qq = QQInfo(); 昵称
MsgBox(0, '', $qq)
$qq = QQInfo(1); 帐号
MsgBox(0, '', $qq)
Func QQInfo($frag = 0)
Local $info, $sR, $i, $i_C, $txt
Local $hTb = ControlGetHandle('[class:Shell_TrayWnd]', '', '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
If $frag < UBound($sR) Then
$info = $sR[$frag]
Else
$info = 'error'
EndIf
EndIf
Next
Return $info
EndFunc ;==>QQInfo
回复 3# 5735988 |