本帖最后由 半芯竹 于 2015-2-15 13:39 编辑
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
$Debug_LV = False
Local $iI, $iTimer, $hListView,$aArray,$HTML,$aItems[1000][1]
GUICreate("ListView Add Array", 400, 400)
$hListView = GUICtrlCreateListView("", 2, 2, 394, 394)
GUISetState()
_GUICtrlListView_AddColumn($hListView, "Items", 300)
_GUICtrlListView_SetItemCount($hListView, 1000)
AdlibRegister("_main",3000)
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
Func _Main()
_GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($hListView))
$HTML = BinaryToString(InetRead('http://hq.sinajs.cn/list=AU1506'))
$aArray = StringSplit($HTML, ',')
For $iI = 0 To UBound($aArray) - 1
$aItems[$iI][0] = $aArray[$iI]
Next
_GUICtrlListView_AddArray($hListView, $aItems)
EndFunc ;==>_Main
你自己测试下吧。。 |