#Include <array.au3>
Global $avCtrlList[1] = [0]
$Title = "成交回报"
$Text = ""
WinWaitActive($Title)
$ClassNames = _WinGetClassNameList($Title, $Text)
$avClassList = StringSplit($ClassNames, @LF)
For $i = 1 To $avClassList[0]-1
MsgBox(0,"",ControlGetText($Title,$Text,$avClassList[$i]))
Next
Func _WinGetClassNameList($sWinTitle = "", $sWinText = "")
Local $c, $NN, $hCtrl
Local $sClassList = WinGetClassList($sWinTitle, $sWinText)
If @error Then Return SetError(1, 0, 0)
Local $avClassList = StringSplit($sClassList, @LF)
$sClassList = ""
For $c = 1 To $avClassList[0]
$NN = 1
While 1
$hCtrl = ControlGetHandle($sWinTitle, $sWinText, $avClassList[$c] & $NN)
If @error Then
ExitLoop
Else
$sClassList &= $avClassList[$c] & $NN & @LF
$NN += 1
EndIf
WEnd
Next
Return $sClassList
EndFunc
|