希望各位能给出一个能读取多行,或跳行的方法。
最好能使用 For...To.
如果不能也没关系。
等待中。。。
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("网吧计算机IP列表", 365, 209, 280, 260)
GUISetFont(9, 400, 0, "宋体")
$ListView1 = GUICtrlCreateListView("计算机名|IP地址|MAC地址", 0, 8, 361, 153, BitOR($LVS_SHOWSELALWAYS, $LVS_REPORT))
GUICtrlSendMsg(-1, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES,$LVS_EX_GRIDLINES) ;列表里的线
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 100)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 100)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 120)
GUICtrlSetBkColor(-1, 0xA6CAF0)
$ListView1_0 = GUICtrlCreateListViewItem("1|192.168.1.1|00:1C:25:08:06:CA", $ListView1)
$ListView1_1 = GUICtrlCreateListViewItem("2|192.168.1.2|00:1C:25:08:5E:4E", $ListView1)
$ListView1_2 = GUICtrlCreateListViewItem("3|192.168.1.3|00:1C:25:08:5E:4F", $ListView1)
$ListView1_3 = GUICtrlCreateListViewItem("4|192.168.1.4|00:1C:25:08:8E:4E", $ListView1)
$ListView1_4 = GUICtrlCreateListViewItem("5|192.168.1.5|00:1C:25:08:5E:DC", $ListView1)
$ListView1_5 = GUICtrlCreateListViewItem("6|192.168.1.6|00:1C:25:07:54:FF", $ListView1)
$ListView1_6 = GUICtrlCreateListViewItem("7|192.168.1.7|00:1C:25:6C:96:AE", $ListView1)
$ListView1_7 = GUICtrlCreateListViewItem("8|192.168.1.8|00:1C:25:6C:97:28", $ListView1)
$Button1 = GUICtrlCreateButton("读 取", 280, 176, 75, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
|