本帖最后由 afan 于 2019-9-23 11:19 编辑
$Title = "标题名称"
Local $hWnd = WinWait($Title, "", 10)
WinActivate($hWnd)
$sClassList = _WinGetClassListNum($hWnd)
MsgBox(64,"类列表", $sClassList)
Func _WinGetClassListNum($hWnd)
Local $sClassList = WinGetClassList($hWnd)
Local $aC = StringRegExp($sClassList, '\V+', 3)
If @error Then Return SetError(1, 0, '')
Local $sOut = '', $ix
For $ii = 0 To UBound($aC) - 1
If IsDeclared($aC[$ii]) Then ContinueLoop
Assign($aC[$ii], 0)
$ix = 0
Do
$ix += 1
If Not ControlGetHandle($hWnd, '', $aC[$ii] & $ix) Then ExitLoop
$sOut &= $aC[$ii] & $ix & @LF
Until 0
Next
Return $sOut
EndFunc ;==>_WinGetClassListNum
|