很基础的东西,要多实践一下,帮你修改了一下。
#NoTrayIcon
#include <GuiListView.au3>
#include<array.au3>
#include <File.au3>
GUICreate("测试", 560, 320)
$ListView1 = GUICtrlCreateListView('IP |端口 |类型 |所在地区 |测试连接|||', 5, 5, 550, 300)
GUISetState()
_ld()
While 1
If GUIGetMsg() = -3 Then Exit
WEnd
Func _ld()
_GUICtrlListView_DeleteAllItems($ListView1)
Local $str, $i, $dt, $aArray1
_FileReadToArray(@ScriptDir & "\wz.txt", $aArray1)
_ArrayDisplay($aArray1)
If @error Then Return MsgBox(48, 0, '错误')
For $i = 1 To UBound($aArray1) - 1
$str = StringSplit($aArray1[$i], "$$", 1)
$wz = $str[1]
$dk = $str[2]
$lx = $str[3]
$dq = $str[4]
$dt = $wz & '|' & $dk & '|' & $lx & '|' & $dq
GUICtrlCreateListViewItem($dt, $ListView1)
Next
EndFunc ;==>_ld
|