回复 1# xiaogou5852
试试这个代码
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=
Global $rList = WinList("快播下载器"),$rLabel[3]
$Form1 = GUICreate("实时显示?", 380, 200, 192, 154)
GUICtrlCreateGroup(" 这是第一个实例 ", 10, 10, 360, 70)
$rLabel[1] = GUICtrlCreateLabel("",20,30,340,40)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup(" 这是第二个实例 ", 10, 90, 360, 70)
$rLabel[2] = GUICtrlCreateLabel("",20,110,340,40)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$rStart = GUICtrlCreateButton("捕捉消息", 10, 165, 100, 30)
$rStop = GUICtrlCreateButton("停止捕捉", 140, 165, 100, 30)
$rQuit = GUICtrlCreateButton("退出", 270, 165, 100, 30)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE,$rQuit
Exit
Case $rStart
AdlibRegister("_MyAdlib")
Case $rStop
AdlibUnRegister("_MyAdlib")
EndSwitch
WEnd
Func _MyAdlib()
For $i = 1 To $rList[0][0]
$GetText = ControlGetText($rList[$i][0], "", "[CLASS:Static; INSTANCE:5]")
GUICtrlSetData($rLabel[$i],$GetText)
Next
EndFunc ;==>_MyAdlib
|